# Accounts API reference

The Accounts API reference covers 8 endpoints of the SkedCast social media REST API. Connected social accounts and posting limits.

## List connected accounts

`GET /accounts`

Scope: `accounts.read`

| Field | Type | In | Required | Description |
| --- | --- | --- | --- | --- |
| `cursor` | string | query | no | Keyset cursor from a previous page. |
| `limit` | integer | query | no | Page size (1–100). |
| `clientId` | string (uuid) | query | no |  |
| `platform` | enum: x | linkedin | instagram | facebook | tiktok | youtube | … | query | no |  |
| `publishable` | boolean | query | no | `true` returns only the channels a post can go out on right now (the channel's publish capability is allowed). Omitted or `false` returns every channel. |
| `status` | enum: active | reauth_required | disconnected | query | no | Filter by channel status. A row's `status` can also read `rate_limited` or `expiring`; those are not filter values and are refused with 422. |

Responses: 200, 400, 401, 403, 404, 422, 429

## Posting-limits overview

`GET /accounts/cadence`

Scope: `accounts.read`

Responses: 200, 400, 401, 403, 404, 422, 429

## Get a connected account

`GET /accounts/{id}`

Scope: `accounts.read`

| Field | Type | In | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | string (uuid) | path | yes |  |

Responses: 200, 400, 401, 403, 404, 422, 429

## Get an account's posting limits

`GET /accounts/{id}/cadence`

Scope: `accounts.read`

| Field | Type | In | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | string (uuid) | path | yes |  |

Responses: 200, 400, 401, 403, 404, 422, 429

## List a Pinterest account's boards

`GET /accounts/{id}/boards`

Scope: `accounts.read`

| Field | Type | In | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | string (uuid) | path | yes |  |

Responses: 200, 400, 401, 403, 404, 422, 429

## Create a Pinterest board

`POST /accounts/{id}/boards`

Scope: `posts.compose`

Create a board on a connected Pinterest account and return its id and name, ready to use as a Pin's `boardId`. `privacy` is `PUBLIC` (the default) or `SECRET` (only the account and its collaborators see it). Requires the `posts.compose` scope, a role that can create boards on that channel (a Publisher or Editor access role on it, a Manager or the Owner; a Viewer, Contributor or Community manager gets `403 rbac_permission_denied`), a verified email, and an `Idempotency-Key` header.

| Field | Type | In | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | string (uuid) | path | yes |  |
| `Idempotency-Key` | string | header | yes | A unique key (for example a UUID, up to 255 characters) for this request. Retry a 429, 502, 503 or 504, or a request that got no response, with the same Idempotency-Key: SkedCast runs it once or returns the first result. Every other answer, including a 500, is kept for 24 hours and returned again for that key, so send a new key to try again. |
| `name` | string | body | yes |  |
| `description` | string | body | no |  |
| `privacy` | enum: PUBLIC | SECRET | body | no |  |

Responses: 201, 400, 401, 403, 404, 409, 422, 429

## List a Pinterest board's sections

`GET /accounts/{id}/boards/{boardId}/sections`

Scope: `accounts.read`

| Field | Type | In | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | string (uuid) | path | yes |  |
| `boardId` | string | path | yes | A Pinterest board id (digits), from `GET /accounts/{id}/boards`. |

Responses: 200, 400, 401, 403, 404, 422, 429

## Create a Pinterest board section

`POST /accounts/{id}/boards/{boardId}/sections`

Scope: `posts.compose`

Create a section on one board of a connected Pinterest account and return its id and name. Requires the `posts.compose` scope, a role that can create boards on that channel (a Publisher or Editor access role on it, a Manager or the Owner; a Viewer, Contributor or Community manager gets `403 rbac_permission_denied`), a verified email, and an `Idempotency-Key` header.

| Field | Type | In | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | string (uuid) | path | yes |  |
| `boardId` | string | path | yes | A Pinterest board id (digits), from `GET /accounts/{id}/boards`. |
| `Idempotency-Key` | string | header | yes | A unique key (for example a UUID, up to 255 characters) for this request. Retry a 429, 502, 503 or 504, or a request that got no response, with the same Idempotency-Key: SkedCast runs it once or returns the first result. Every other answer, including a 500, is kept for 24 hours and returned again for that key, so send a new key to try again. |
| `name` | string | body | yes |  |

Responses: 201, 400, 401, 403, 404, 409, 422, 429
