Browse docs
What it does#
Three calls take a new key to a scheduled post: GET /v1/agency proves the key, POST /v1/posts schedules, GET /v1/post-targets/{id} reads the result.
Social media API quickstart steps#
| Step | What you do | What you get |
|---|---|---|
| 1. Create a key | Settings → Developer | A sked_live_ secret |
| 2. First request | GET /v1/agency | Your workspace profile |
| 3. Compose | POST /v1/posts | A scheduled post |
| 4. Confirm | GET /v1/post-targets/:id | Status and permalink |
What you need#
- A workspace on a plan with API access, and the Owner or Manager role.
- At least one connected social account, and curl or any HTTP client.
Base URLs#
| Surface | URL |
|---|---|
| REST API | https://api.skedcast.com/v1 |
| MCP server | https://api.skedcast.com/mcp |
| OpenAPI spec | https://skedcast.com/openapi.json |
1. Create an API key#
In Settings → Developer, create a key with the scopes agency.read, clients.read, accounts.read, posts.compose and posts.read, and copy the secret: it is shown once. Keep it on your server. The scopes reference lists every scope.
Keys start with sked_live_ or sked_test_. Both act on your real workspace.
2. Make your first request#
bash
curl https://api.skedcast.com/v1/agency \
-H "Authorization: Bearer sked_live_YOUR_KEY"json
{
"data": {
"object": "agency",
"id": "<workspaceId>",
"name": "Acme Social",
"plan": "studio",
"role": "owner"
},
"meta": { "correlationId": "c-74fb602e-…" }
}3. Find the ids#
bash
curl "https://api.skedcast.com/v1/clients?limit=10" -H "Authorization: Bearer sked_live_YOUR_KEY"
curl "https://api.skedcast.com/v1/accounts" -H "Authorization: Bearer sked_live_YOUR_KEY"4. Schedule a post#
bash
curl -X POST https://api.skedcast.com/v1/posts \
-H "Authorization: Bearer sked_live_YOUR_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{ "clientId": "<clientId>", "content": "Hello world", "targets": { "mode": "selection", "accountIds": ["<accountId>"] }, "schedule": { "type": "at", "scheduledAt": "2030-01-15T15:00:00Z" } }'- Send the same body to
POST /v1/posts/previewfirst: it validates per platform and writes nothing. - Times are UTC ending in
Z, orscheduledLocalwith atimezone. - Attach media by id: see media uploads. Every body field is in the API reference.
5. Confirm the post#
json
{
"data": {
"postId": "<postId>",
"status": "scheduled",
"targets": [ { "...": "one row per destination" } ],
"replayed": false
},
"meta": { "correlationId": "c-…" }
}Post target statuses#
| Status | What it means |
|---|---|
draft | Saved, not scheduled |
scheduled | Waiting for its time |
native_scheduled | Handed to the platform's own scheduler (Facebook and YouTube, only when you ask for native scheduling) |
published | Live; externalId and permalink are filled in once the platform reports them |
failed | The attempt failed; requiredAction says whether to retry |
canceled | Cancelled before it published |
on_hold | Waiting for a reason named in holdReason, such as a platform limit or media still preparing |
missed | Its time passed without a publish; reschedule it |
The same calls in TypeScript#
ts
const API = "https://api.skedcast.com/v1";
const headers = { Authorization: `Bearer ${process.env.SKEDCAST_API_KEY}`, "Content-Type": "application/json" };
// 1. Prove the key works.
const agency = await fetch(`${API}/agency`, { headers }).then((r) => r.json());
console.log(agency.data.name);
// 2. Schedule a post. A new Idempotency-Key per new post.
const res = await fetch(`${API}/posts`, {
method: "POST",
headers: { ...headers, "Idempotency-Key": crypto.randomUUID() },
body: JSON.stringify({
clientId: "<clientId>",
content: "Hello world",
targets: { mode: "selection", accountIds: ["<accountId>"] },
schedule: { type: "at", scheduledAt: "2030-01-15T15:00:00Z" },
}),
});
if (!res.ok) throw new Error(JSON.stringify(await res.json())); // an RFC 9457 problem document
// 3. Read it back.
const { data } = await res.json();
const post = await fetch(`${API}/posts/${data.postId}`, { headers }).then((r) => r.json());
console.log(post.data);Verify#
GET /v1/agencyreturns your workspace, and the post answers201withstatusscheduled.- Each post target reaches
published, or you gettarget.publishedandtarget.failedwebhooks. - Before going live, the key holds only the scopes it uses and is stored as a server secret.
Troubleshoot#
| Answer | Meaning | Fix |
|---|---|---|
400 idempotency_key_required | A write had no Idempotency-Key | Add one and send again |
401 | The credentials are missing or invalid | Check the Authorization header and the key |
403 insufficient_scope | The key lacks the scope | Create a key with it |
409 | Destination already published | Do not resend |
422 | The body is invalid; errors names each field | Fix the fields and use a new key |
429, 502, 503, 504 | A budget ran out or a temporary server problem | 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. |
Next steps and reference links#
- Webhooks and how to verify a webhook signature for events instead of polling.
- Client libraries, authentication and the API reference.
- Partner onboarding to connect a client's accounts, and the changelog.
- The request builder and code snippets to try a request.
- All developer docs, grouped into reference, guides and tools.