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

`GET /api/v1/teammates`

A page of the workspace's members, whom a request may be assigned to, by name, never an email address. Every id a request's ownerIds holds is among them, a teammate who hasn't set a name included.

Access: A token with requests:read.

## Query parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | No | Only the teammates whose name holds every word of it, whatever its accents. Empty lists them all, and a teammate without a name is never found by one. At most 200 characters. |
| `limit` | integer | No | How many teammates 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 teammates by name, those who haven't set a name first. |
| `items.id` | string | The teammate's id: m_ and their user id, as the people endpoints name them, which a request's ownerIds take. |
| `items.name` | string or null | The teammate's name. Null for one who hasn't set a name. Their email address is never answered. |
| `items.role` | string | Their role in the workspace: owner, admin or member, the highest where they hold several. One of: `member`, `admin`, `owner`. |
| `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 requests, boards, tags and statuses. 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/teammates?limit=20" \
  -H "Authorization: Bearer $NOTERT_API_TOKEN"
```

## Example response 200

```json
{
  "items": [
    {
      "id": "m_5k2m9p4q7r1t",
      "name": "Hannah Lee",
      "role": "admin"
    }
  ],
  "nextCursor": "WyJoYW5uYWggbGVlIiwidXNlcl81azJtOXA0cTdyMXQiXQ"
}
```
