# Clients API reference

The Clients API reference covers 6 endpoints of the SkedCast social media REST API. Client groups (brands / influencers).

## List clients

`GET /clients`

Scope: `clients.read`

| Field | Type | In | Required | Description |
| --- | --- | --- | --- | --- |
| `cursor` | string | query | no | Keyset cursor from a previous page. |
| `limit` | integer | query | no | Page size (1–100). |
| `type` | enum: influencer | brand | query | no |  |
| `search` | string | query | no |  |

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

## Create a client

`POST /clients`

Scope: `clients.manage`

Create a client group (a brand or an individual influencer). Idempotent on the workspace and name. Requires the `clients.manage` scope (Owner or Manager) and an `Idempotency-Key` header.

| Field | Type | In | Required | Description |
| --- | --- | --- | --- | --- |
| `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 |  |
| `type` | enum: influencer | brand | body | yes |  |
| `defaultPostMode` | enum: now | draft | body | no |  |
| `rules` | object | body | no |  |
| `brandVoice` | object | body | no | Per-client AI brand-voice profile. |
| `brand` | ClientBrand | null | body | no | The client's logo (an absolute http(s) image URL) and colour (#rrggbb), shown on the cover of its client-branded and co-branded reports. null clears it. |

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

## Get a client

`GET /clients/{id}`

Scope: `clients.read`

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

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

## Update a client

`PATCH /clients/{id}`

Scope: `clients.manage`

Update a client's name, type, default post mode, rules, or brand voice — only provided fields change. Requires the `clients.manage` scope (Owner, Manager, or an Editor on the client).

| 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 | no |  |
| `type` | enum: influencer | brand | body | no |  |
| `defaultPostMode` | enum: now | draft | body | no |  |
| `rules` | object | body | no |  |
| `brandVoice` | object | body | no |  |
| `brand` | ClientBrand | null | body | no | The client's logo (an absolute http(s) image URL) and colour (#rrggbb), shown on the cover of its client-branded and co-branded reports. null clears it. |

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

## Archive a client

`DELETE /clients/{id}`

Scope: `clients.manage`

Archive a client. Only the workspace Owner can archive a client: the `clients.manage` scope does not allow it for a Manager.

| 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. |

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

## Create an account connect link

`POST /clients/{id}/connect-invites`

Scope: `accounts.connect`

Create a connect link bound to this client. The recipient opens the URL (no SkedCast login) and connects their own accounts on the requested platforms. The link is valid until `expiresAt` and can be used more than once in that window, so one link connects every requested platform. Requires the `accounts.connect` scope (Owner or Manager) 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. |
| `platforms` | array of string | body | yes | The platforms the recipient may connect (≥1). |
| `email` | string (email) | body | no | Optional recipient email (for your records). |
| `expiresInHours` | integer | body | no | Link lifetime in hours (1–168; default 48). |

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