# Accounts

> 2 endpoints: list connected accounts, retrieve an account.

- [List connected accounts](#list-connected-accounts): `GET /v1/accounts`
- [Retrieve an account](#retrieve-an-account): `GET /v1/accounts/{account_id}`

### List connected accounts

`GET /v1/accounts`

Lists the social accounts connected in the Projects this key can reach, oldest first.

Permission: `accounts:read`

#### Query parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | integer | No | Items per page, 1 to 100. (1 to 100, default 25) |
| `cursor` | string | No | The next_cursor of the previous page. (up to 512 characters) |
| `project_id` | string | No |  (up to 128 characters) |
| `network` | `youtube`, `tiktok`, `instagram`, `facebook`, `threads`, `bluesky`, `mastodon`, `pinterest`, `telegram`, `twitch`, `x`, `discord` | No |  |

#### Response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | `"list"` | Yes |  |
| `data` | array of object | Yes |  |
| `data[].object` | `"account"` | Yes |  |
| `data[].id` | string | Yes |  (up to 128 characters) |
| `data[].project_id` | string or null | Yes |  |
| `data[].network` | `youtube`, `tiktok`, `instagram`, `facebook`, `threads`, `bluesky`, `mastodon`, `pinterest`, `telegram`, `twitch`, `x`, `discord` | Yes |  |
| `data[].name` | string | Yes |  |
| `data[].handle` | string or null | Yes |  |
| `data[].avatar_url` | string or null | Yes |  |
| `data[].followers` | integer or null | Yes |  |
| `data[].status` | `active`, `reconnect_required`, `error` | Yes |  |
| `data[].connected_at` | string | Yes | ISO 8601 date and time, UTC. |
| `has_more` | boolean | Yes |  |
| `next_cursor` | string or null | Yes |  |

```bash
curl https://api.nowscale.com/v1/accounts \
  -H "Authorization: Bearer $NOWSCALE_API_KEY"
```

### Retrieve an account

`GET /v1/accounts/{account_id}`

Returns one connected account.

Permission: `accounts:read`

#### Path parameters

| Name | Description |
| --- | --- |
| `account_id` | The account's id. |

#### Response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | `"account"` | Yes |  |
| `id` | string | Yes |  (up to 128 characters) |
| `project_id` | string or null | Yes |  |
| `network` | `youtube`, `tiktok`, `instagram`, `facebook`, `threads`, `bluesky`, `mastodon`, `pinterest`, `telegram`, `twitch`, `x`, `discord` | Yes |  |
| `name` | string | Yes |  |
| `handle` | string or null | Yes |  |
| `avatar_url` | string or null | Yes |  |
| `followers` | integer or null | Yes |  |
| `status` | `active`, `reconnect_required`, `error` | Yes |  |
| `connected_at` | string | Yes | ISO 8601 date and time, UTC. |

```bash
curl https://api.nowscale.com/v1/accounts/ACCOUNT_ID \
  -H "Authorization: Bearer $NOWSCALE_API_KEY"
```
