Browse docs
Request headers#
| Header | Direction | Purpose |
|---|---|---|
Authorization | request | Bearer sked_… (API key) or Bearer <token> (OAuth) |
Content-Type | request | application/json on every request with a body |
Idempotency-Key | request | Required on POST, PATCH and DELETE, except POST /posts/preview; dedupes retries |
X-Correlation-Id | both | Trace id, echoed in meta.correlationId. You can send your own: 1 to 128 letters, digits, dot, underscore or hyphen. Any other value is replaced, never refused |
RateLimit-* | response | Your budget, what is left, and seconds to reset (on a 429: Retry-After) |
Request body#
| Rule | Behaviour |
|---|---|
| Unknown fields | Refused with 422 validation_failed and an errors entry, not ignored, so a misspelled field fails loudly |
| Ids | UUIDs; a path or body id that is not a valid UUID is refused as a validation error before any lookup |
| Validation errors | Each errors entry names the path of the field and says what is wrong |
Timestamps and time zones#
scheduledAt is a UTC instant (ISO 8601). scheduledLocal is a clock time read in timezone, else the client's zone, the workspace's, then UTC. When you send both, scheduledLocal wins.
Use scheduledAt when you already hold an instant, and scheduledLocal with timezone when a person picked a clock time. Store instants; convert to local only for display.
Schedule fields#
| Field | Takes | Notes |
|---|---|---|
type | now, at or range | now publishes immediately; at needs a time; range needs from and to |
scheduledAt | UTC instant | For example 2030-01-15T15:00:00Z |
scheduledLocal | YYYY-MM-DDTHH:mm | No zone in the value; the zone comes from timezone or the defaults |
timezone | A zone name | Read with scheduledLocal |
spreadMinutes | 0 to 720, default 0 | Spreads the posts across that many minutes after the chosen time, never earlier |
Response envelope#
A single resource returns { data, meta }; a collection returns { data, page, meta }.
{
"data": [ { "object": "client", "id": "…" }, … ],
"page": { "cursor": null, "nextCursor": "eyJ…", "hasMore": true },
"meta": { "correlationId": "c-…" }
}| Field | Where | What it holds |
|---|---|---|
data | Every success | The resource, or an array of resources on a list |
page.cursor | Lists | The cursor this page was read from; null on the first page |
page.nextCursor | Lists | Pass this as cursor for the next page; null when there is none |
page.hasMore | Lists | true while another page exists |
meta.correlationId | Every success | The trace id of this request; send it to support |
correlationId | Every error | The same trace id on the problem document |
Pagination#
Lists use keyset pagination: stable under inserts and fast at any depth. Send limit (1 to 100) and the previous nextCursor as cursor until hasMore is false.
A cursor is opaque: pass back exactly the nextCursor you received, with the same filters, and never build, edit or store one for later.
curl "https://api.skedcast.com/v1/posts?limit=50&cursor=eyJ…" \
-H "Authorization: Bearer sked_live_YOUR_KEY"REST API pagination errors#
Loop on hasMore, not on page length, and keep the last nextCursor outside the loop so a failure resumes there. The loop is in the API pagination guide.
| Answer | Cause | Fix |
|---|---|---|
400 invalid_cursor | The cursor is malformed, was edited, or is not a cursor this list issued | Start again from the first page and use the nextCursor as returned |
400 cursor_sort_mismatch | The cursor is well formed but was issued for a different sort order | Start from the first page. Retrying cannot work, because the cursor no longer applies |
422 validation_failed, errors path limit | limit is not a whole number from 1 to 100 | Send a limit between 1 and 100 |
422 validation_failed, errors path cursor | The cursor is longer than a list accepts (512 characters on the posts list) | Send the nextCursor unchanged, never joined to other text |
429 rate_limited | The request budget for your key, app or workspace ran out | Wait for Retry-After, then continue from the same cursor |
401 or 403 | The credential expired or lacks the scope partway through a long loop | Fix the credential, then resume from the last nextCursor you kept |
type Page = { data: unknown[]; page: { nextCursor: string | null; hasMore: boolean } };
export async function* allPosts(apiKey: string, resumeFrom?: string): AsyncGenerator<unknown[]> {
let cursor = resumeFrom;
while (true) {
const url = new URL("https://api.skedcast.com/v1/posts");
url.searchParams.set("limit", "100");
if (cursor) url.searchParams.set("cursor", cursor);
const res = await fetch(url, { headers: { Authorization: "Bearer " + apiKey } });
if (res.status === 429) {
const wait = Number(res.headers.get("Retry-After")) || 5; // seconds
await new Promise((resolve) => setTimeout(resolve, wait * 1000));
continue; // same cursor, same page
}
if (!res.ok) {
const problem = await res.json(); // application/problem+json
// invalid_cursor and cursor_sort_mismatch: restart from the first page, do not retry.
throw new Error(problem.code + " (correlationId " + problem.correlationId + ")");
}
const body = (await res.json()) as Page;
yield body.data;
if (!body.page.hasMore) return;
cursor = body.page.nextCursor ?? undefined;
}
}Errors#
Errors are RFC 9457 application/problem+json. Branch on the stable code, show detail to a person and never parse it: extension members are less error-prone (IETF RFC 9457, July 2023, read 22 November 2026).
{
"type": "https://skedcast.com/errors/validation_failed",
"title": "Validation failed",
"status": 422,
"category": "bad-body",
"code": "validation_failed",
"detail": "One or more fields are invalid.",
"correlationId": "c-…",
"errors": [ { "path": "content", "message": "Required" } ]
}Error fields#
| Field | Type | Use it to |
|---|---|---|
code | Stable string | Decide what to do. Safe to switch on |
status | HTTP status | Choose retry or fix, as in the status table below |
title | Short text | Show in a log line |
detail | Sentence | Show to a person. Do not parse it |
correlationId | Trace id | Quote to support |
errors | Array on 422 | Mark each invalid field by its path |
limit / feature | Object on 403 | Offer the right upgrade or removal |
Refusals that add a member#
| Answer | Adds | Notes |
|---|---|---|
403 limit_reached | limit: quota (such as maxAccounts or storageBytes), limit, current, requested, and renewsOn for a quota that renews | A plan limit |
403 feature_unavailable | feature: key, and availableOn, the lowest plan that includes it | A plan feature you don't have |
409 targets_not_publishable | channels: for each channel the request named that cannot publish, accountId, platform, state, stateReason ({ code, label, explanation }) and action (reconnect, upgrade or contact-support) | A new post, schedule or validation names a channel that cannot publish right now. Also on 400 targets_out_of_scope (a channel that needs reconnecting) and 400 no_targets_resolved (a group selection with nothing to publish to) |
403 platform_limit_reached | Nothing extra | A hard maximum no plan lifts (20 webhook endpoints, 50 link-in-bio pages): remove one instead of upgrading |
{
"type": "https://skedcast.com/errors/limit_reached",
"title": "Plan limit reached",
"status": 403,
"category": "forbidden",
"code": "limit_reached",
"detail": "Your plan includes 10 connected accounts — upgrade to add more",
"correlationId": "c-…",
"action": "upgrade",
"limit": { "quota": "maxAccounts", "limit": 10, "current": 10, "requested": 1 }
}Status codes#
| Status | Meaning |
|---|---|
| 400 / 422 | Malformed request / validation failed |
| 401 | Missing or invalid credentials |
| 403 | Authenticated but lacking the scope/role |
| 404 | Resource not found |
| 409 | Conflict: a state conflict, or a request with the same Idempotency-Key still running |
| 429 | Rate limited — back off per Retry-After |
| 5xx | Server error. 502, 503 and 504: retry with backoff and the same Idempotency-Key. 500: the answer is kept for that key, so retry with a new key |
Idempotency and retries#
Every POST, PATCH and DELETE (except POST /posts/preview) needs an Idempotency-Key: a unique string up to 255 characters, a UUID ideally. Replaying a key returns the original result, never a duplicate.
Send a new key for a new operation, and never reuse a key with a different body. The IETF Idempotency-Key draft is not a final standard yet (read 22 November 2026).
Idempotency errors#
| Status and code | Meaning and what to do |
|---|---|
400 idempotency_key_required | The header is missing. Send one. |
400 idempotency_key_invalid | The key is empty or longer than 255 characters. |
409 idempotency_in_progress | The first request with this key is still running. Wait for Retry-After, then retry with the same key. |
422 idempotency_key_reuse | The key was already used with a different request body. Use a new key for a new request. |
Retry decision#
| Outcome | Retry? | Which key |
|---|---|---|
| No response, or the connection dropped | Yes | The same key |
429 | Yes, after Retry-After | The same key |
502, 503, 504 | Yes, with backoff | The same key |
409 idempotency_in_progress | Yes, after Retry-After | The same key: the first request is still running |
500 | Only if you mean to try again | A new key: the answer is kept for the old one |
400, 401, 403, 404, 422 | No: change the request or the credential first | A new key once the request is different |
export async function postWithRetry(path: string, body: unknown, apiKey: string): Promise<Response> {
const key = crypto.randomUUID(); // one key per logical write, reused on every retry
for (let attempt = 0; attempt < 5; attempt++) {
const res = await fetch("https://api.skedcast.com/v1" + path, {
method: "POST",
headers: {
Authorization: "Bearer " + apiKey,
"Idempotency-Key": key,
"Content-Type": "application/json",
},
body: JSON.stringify(body),
});
// 429, 502, 503 and 504 release the key, so the same key runs the request again.
if (![429, 502, 503, 504].includes(res.status)) return res;
const wait = Number(res.headers.get("Retry-After")) || 2 ** attempt; // seconds
await new Promise((resolve) => setTimeout(resolve, wait * 1000));
}
throw new Error("Gave up after 5 attempts");
}Rate limits#
Your plan sets a request budget per minute, applied to each API key or OAuth app and again to the whole workspace. Read the RateLimit-* headers and back off on a 429 using Retry-After; do not hard-code delays.
| Plan | API requests / min | MCP requests / min | MCP destructive / min |
|---|---|---|---|
| Solo | Not included | 60 | 10 |
| Studio | 120 | 60 | 20 |
| Agency | 300 | 120 | 40 |
| Agency+ | 600 | 240 | 80 |
| Enterprise | 1200 | 480 | 160 |
Rate limit headers#
| Header | Value |
|---|---|
RateLimit-Limit | Your budget a minute |
RateLimit-Remaining | What is left |
RateLimit-Reset | Seconds until the budget refills |
Retry-After | On a 429, a number of seconds here. HTTP also allows a date, so a generic client should accept both (IETF RFC 9110, section 10.2.3) |
Rate limit rules#
| Rule | Detail |
|---|---|
| Batch cost | One unit per item: a call that creates 50 posts uses 50. A bulk action counts the destinations it touches, so one call that cancels 500 posts uses 500 |
| MCP | One budget per connected client, and a smaller one for tools that delete or cancel (a client, campaign or webhook, a post, or a batch that can cancel many). Scheduling and publishing are ordinary writes |
| Write limit | Set in Settings → Developer on a key, or on a connected app for the workspace. Reads keep the plan budget; writes (anything but a GET on the REST API, and any MCP tool that changes something) draw on the write limit, which can only lower the plan budget |
| Refused requests | A refused request still counts toward the plan budget, so back off before you retry |
429 detail | Names the budget that ran out: connection (this key or app), workspace (every key and app together) or writes (a write limit) |
| Usage | In Settings → Developer, each API key has a Usage view: its requests and refused requests per day and over the last 24 hours |
| Platform limits | Whatever your request rate, publishing respects each platform's own limits and your plan's post caps |
These are the three header names SkedCast sends today. The IETF draft defines a combined RateLimit and a RateLimit-Policy field instead (draft-ietf-httpapi-ratelimit-headers-12, read 22 November 2026); it is not a standard, so check a real response.
Batch calls#
A batch call (POST /posts/bulk) answers 200 with one result per item, so a 200 does not mean every item worked. Items are created in order, each in its own transaction; a failing item never undoes earlier ones.
The request's Idempotency-Key covers the whole call, and each item gets a key derived from it or supplied in itemKeys, so resending a batch creates nothing twice.
| Rule | Single write | Batch (POST /posts/bulk) |
|---|---|---|
| Items per call | One | 1 to 50, each exactly a POST /posts body |
| Result | The resource, or an error status | 200 with one result per item |
| A failing item | The whole request fails | Only that item fails; the rest stand |
| Rate-limit cost | One unit | One unit per item |
| Idempotency | The request's key | The request's key, plus a key per item derived from it |
| Dry run | POST /posts/preview | validateOnly: true |
Request tracing#
Every request gets a correlation id: the X-Correlation-Id response header, meta.correlationId on a success and correlationId on an error. Quote it to support.
Versioning and deprecation#
The version is in the path: every route is under /v1. Fields and routes are added without changing the meaning of existing ones, so ignore fields you do not know.
A retired route signals it with the Deprecation header (IETF RFC 9745, March 2025) and the Sunset header (IETF RFC 8594), both read 22 November 2026. Every change is dated in the SkedCast API changelog, newest first.
Related reference#
These conventions apply to every route in the SkedCast developer documentation.
- API reference: each path with its scope.
- Quickstart: a first post using the header rules.
- API pagination guide: the cursor loop.
- Rate limits guide: backoff in depth.
- API error catalogue: every error code.
- Webhooks guide: deliveries follow their own retry rules.
- Client libraries guide: a typed client generated from the OpenAPI document.
- Schedule posts via API, the API request builder and the code snippets.
- Media uploads guide, authentication, scopes and pricing.
Sources
- IETF RFC 9457: Problem Details for HTTP APIs
- IETF RFC 6585: Additional HTTP Status Codes (429 Too Many Requests)
- IETF RFC 9110: HTTP Semantics (Retry-After)
- IETF RFC 9745: The Deprecation HTTP Response Header Field
- IETF RFC 8594: The Sunset HTTP Header Field
- IETF Internet-Draft: The Idempotency-Key HTTP Header Field
- IETF Internet-Draft: RateLimit header fields for HTTP