# List people (https://notert.io/docs/api/reference/list-people)

`GET /api/v1/people`

A page of the workspace's people, newest first: its members, the accounts it banned and its contacts, by name and what they pay the workspace for. A search finds names alone: an email address finds no one, and none is ever answered.

Access: A token with people:read.

## Query parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | No | Words every person found has in their name, each at the start of a word of it when shorter than three letters. Names alone: an email address finds no one. Empty lists everyone. At most 200 characters. |
| `kind` | string | No | Only members, those on the team or banned from it (member), or only contacts, customers and others outside it (contact). Left out, both. One of: `member`, `contact`. |
| `banned` | string | No | true for only those the workspace banned, false for only those it didn't. Left out, both. One of: `true`, `false`. |
| `limit` | integer | No | How many people the page holds. 1 to 100. Default 50. |
| `cursor` | string | No | The nextCursor of the page before. At most 4096 characters. |

## Response 200

| Field | Type | Description |
| --- | --- | --- |
| `items` | object[] | The page's people, newest first. |
| `items.id` | string | The person's id: m_ and a member's user id, or c_ and a contact's id, as the people list answers it. |
| `items.kind` | string | Whether the person is on the workspace's team, or an account it banned from the team (member), or someone outside it the workspace knows, such as a customer who wrote in, voted or was logged by the team (contact). One of: `member`, `contact`. |
| `items.name` | string or null | Their name, as they or the team wrote it. Null for one who gave none. Their email address is never answered. |
| `items.banned` | boolean | Whether the workspace banned them. |
| `items.customer` | object or null | What they pay the workspace for, where its connected billing says. Null for one paying nothing, or a workspace that hasn't connected billing. |
| `items.customer.plan` | string | The plan's name. Of a person's, the best of their subscriptions': a paid one before a trial. |
| `items.customer.trial` | boolean | Whether the plan is a trial rather than paid. |
| `nextCursor` | string or null | Where the next page starts, to send as cursor. Null on the last page. |

## Errors

| Status | Code | Message |
| --- | --- | --- |
| 400 | `BAD_REQUEST` | Input validation failed. |
| 401 | `UNAUTHORIZED` | Send a valid API token as a Bearer token. |
| 403 | `HOLDER_NOT_ALLOWED` | The teammate who holds this API token's secret can't do this in the workspace now. A teammate who can should roll it in the workspace's settings. |
| 403 | `INSUFFICIENT_SCOPE` | This API token can't read your customers and teammates. Create one that may in the workspace's settings. |
| 403 | `NETWORK_NOT_ALLOWED` | This API token works only from the networks it was made for. Call from one of them, or create a token for this one in the workspace's settings. |
| 429 | `TOO_MANY_REQUESTS` | Too Many Requests. Its data holds `retryAfter`. |

## Example request

```sh
curl "https://app.notert.io/api/v1/people?kind=contact&limit=20" \
  -H "Authorization: Bearer $NOTERT_API_TOKEN"
```

## Example response 200

```json
{
  "items": [
    {
      "id": "c_a4c6e8f0-2b1d-4f3a-9c5e-7d9b1f3a5c70",
      "kind": "contact",
      "name": "Hannah Lee",
      "banned": false,
      "customer": {
        "plan": "Business",
        "trial": false
      }
    }
  ],
  "nextCursor": "W2ZhbHNlLCIyMDI2LTExLTAyIDEwOjE1OjAwLjEyMzQ1NiIsImNvbnRhY3QiLCJhNGM2ZThmMC0yYjFkLTRmM2EtOWM1ZS03ZDliMWYzYTVjNzAiXQ"
}
```
