# Post targets API reference

The Post targets API reference covers 7 endpoints of the SkedCast social media REST API. A post target is one post on one connected account: list them, read their tries, and reschedule, retry or cancel each one.

## List post targets

`GET /post-targets`

Scope: `posts.read`

| Field | Type | In | Required | Description |
| --- | --- | --- | --- | --- |
| `cursor` | string | query | no | Keyset cursor from a previous page. |
| `limit` | integer | query | no | Page size (1–100). |
| `status` | enum: draft | scheduled | native_scheduled | published | failed | canceled | … | query | no | One destination status (the values `statuses` lists). |
| `statuses` | string | query | no | Comma-separated destination statuses (e.g. `failed,on_hold`): `draft`, `scheduled`, `native_scheduled`, `published`, `failed`, `canceled`, `on_hold`, `missed`. An unknown value is refused (`422`). |
| `clientId` | string (uuid) | query | no |  |
| `accountId` | string (uuid) | query | no |  |
| `platform` | enum: x | linkedin | instagram | facebook | tiktok | youtube | … | query | no |  |
| `from` | string (date-time) | query | no | Lower bound on `scheduledAt` (inclusive). |
| `to` | string (date-time) | query | no | Upper bound on `scheduledAt` (inclusive). |
| `sort` | enum: created_at | scheduled_at | query | no | Sort key. Defaults to `created_at`; use `scheduled_at` for a publishing timeline. A cursor is bound to the ordering it was issued for — changing this mid-pagination answers `400 cursor_sort_mismatch`, so restart from the first page. |
| `order` | enum: asc | desc | query | no |  |
| `q` | string | query | no | Free-text search over the post's caption, per-platform variant overrides, client name, and destination account label/handle. Matched post-wise, so a match returns the post's full fan-out. |

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

## Get a post target

`GET /post-targets/{id}`

Scope: `posts.read`

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

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

## List the tries on a post target

`GET /post-targets/{id}/attempts`

Scope: `posts.read`

| Field | Type | In | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | string (uuid) | path | yes |  |
| `cursor` | string | query | no | Keyset cursor from a previous page. |
| `limit` | integer | query | no | Page size (1–100). |

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

## Reschedule a post target

`POST /post-targets/{id}/reschedule`

Scope: `posts.compose`

Move a pending post target to a new time — an absolute `scheduledAt` (ISO-8601 UTC, ending in Z, e.g. `2026-11-05T09:00:00Z`) OR a relative `shiftMinutes`, not both. `409` for a published/canceled target; `400` for a non-future time. Requires the `posts.compose` scope.

| 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. |
| `scheduledAt` | string (date-time) | body | no | ISO-8601 UTC instant ending in Z, e.g. 2026-11-05T09:00:00Z. |
| `shiftMinutes` | integer | body | no |  |
| `respectCadence` | boolean | body | no |  |

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

## Retry a post target

`POST /post-targets/{id}/retry`

Scope: `posts.compose`

Re-queue a post target so it publishes again: a `failed` one, or one `on_hold` whose `holdReason` may be cut short: `platform_rate_limit`, `platform_outage`, `shared_capacity`, `quota_unconfirmed`, `channel_blocked` (on `channel_blocked` the post is sent at once, and if it goes through the platform's block is lifted). `409 not_retryable` for any other status or reason; a `missed` target is rescheduled, not retried. No request body. Requires the `posts.compose` scope.

| 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: 201, 400, 401, 403, 404, 409, 422, 429

## Cancel a post target

`POST /post-targets/{id}/cancel`

Scope: `posts.compose`

Cancel a still-pending post target before it publishes (idempotent — an already-canceled target is a no-op success). `409 already_published` for a published target. No request body. Requires the `posts.compose` scope.

| 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: 201, 400, 401, 403, 404, 409, 422, 429

## Bulk post-target action

`POST /post-targets/bulk`

Scope: `posts.compose`

Apply one action (`reschedule`, `retry`, `cancel` or `delete`) across a selection of post-target ids (1 to 5,000). Each is processed independently.

- `cancel` stops a target and keeps its row, which stays in the list as Canceled.
- `delete` removes a row only when the target was never attempted. Every other target (published, held on the platform’s own scheduler, or attempted, which includes most failed posts) is skipped and named in `skippedReasons`. `delete` is never turned into `cancel`.

Returns the accepted and skipped counts (`accepted: 0` means nothing changed) and a reason code for each skipped id. Requires the `posts.compose` scope.

| 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. |
| `action` | enum: reschedule | retry | cancel | delete | body | yes |  |
| `targetIds` | array of string (uuid) | body | yes |  |
| `params` | object | body | no | Options for `reschedule` only: `scheduledAt` (an absolute ISO-8601 UTC time ending in Z) or `shiftMinutes` (a relative move), plus an optional `respectCadence`. |

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