Browse docs
What it does#
SkedCast publishes no SDK to npm. Generate a typed client for every route, body and response from the OpenAPI 3.1 document at https://skedcast.com/openapi.json. The client libraries overview explains the choice for non-developers.
Prerequisites#
- An API key on a plan with API access, kept on a server: never in a browser.
- Node.js 20 or higher for openapi-typescript. Regenerate to pick up new endpoints and fields.
Social media TypeScript SDK: choose a generator#
| Tool | Languages | Install | Commit |
|---|---|---|---|
| openapi-typescript + openapi-fetch | TypeScript, JavaScript | Node.js 20 or higher for the generator, and the 6 kB openapi-fetch package at run time | One generated .d.ts file of types |
| OpenAPI Generator | Many, including Python, Go, Java, C# and PHP | The npm wrapper plus Java 11 or higher, or the Docker image | A generated client library |
| Kiota | Many, including C#, Go, Java, PHP, Python, Ruby and TypeScript | The Kiota tool, and for TypeScript @microsoft/kiota-bundle | Client source for only the parts you generated |
Generate a TypeScript client#
npm install openapi-fetch
npm install --save-dev openapi-typescript
npx openapi-typescript https://skedcast.com/openapi.json -o ./skedcast-api.d.tsMake a request#
import createClient from "openapi-fetch";
import type { paths } from "./skedcast-api";
const client = createClient<paths>({
baseUrl: "https://api.skedcast.com/v1",
headers: { Authorization: `Bearer ${process.env.SKEDCAST_API_KEY}` },
});
const { data, error } = await client.GET("/clients", {
params: { query: { limit: 10 } },
});const idempotencyKey = crypto.randomUUID(); // reuse for every retry of this post
const { data, error, response } = await client.POST("/posts", {
params: { header: { "Idempotency-Key": idempotencyKey } },
body: {
clientId: "<clientId>",
content: "Hello world",
targets: { mode: "selection", accountIds: ["<accountId>"] },
schedule: { type: "at", scheduledAt: "2030-01-15T15:00:00Z" },
},
});
if (response.status === 429) {
const seconds = Number(response.headers.get("Retry-After") ?? "1");
await new Promise((resolve) => setTimeout(resolve, seconds * 1000));
// retry the same request with the same idempotencyKey
} else if (error) {
throw new Error(`SkedCast request failed with status ${response.status}`);
}Fetch one post by id#
const { data, error } = await client.GET("/posts/{id}", {
params: { path: { id: postId } },
});
if (error !== undefined) throw new Error(`Could not read the post: ${error.code}`);Authenticate#
import createClient, { type Middleware } from "openapi-fetch";
import type { paths } from "./skedcast-api";
const auth: Middleware = {
async onRequest({ request }) {
request.headers.set("Authorization", `Bearer ${process.env.SKEDCAST_API_KEY ?? ""}`);
return request;
},
};
export const client = createClient<paths>({ baseUrl: "https://api.skedcast.com/v1" });
client.use(auth);Handle errors#
const { data, error, response } = await client.GET("/clients", { params: { query: { limit: 10 } } });
if (error !== undefined) {
throw new Error(`SkedCast returned ${response.status} ${error.code} (correlationId ${error.correlationId})`);
}
console.log(data.data.length);Paginate a list#
const clients = [];
let cursor: string | undefined;
do {
const { data, error } = await client.GET("/clients", { params: { query: { limit: 100, cursor } } });
if (error !== undefined) throw new Error(`List failed with code ${error.code}`);
clients.push(...data.data);
cursor = data.page.hasMore ? (data.page.nextCursor ?? undefined) : undefined;
} while (cursor !== undefined);Other languages#
curl -o skedcast-openapi.json https://skedcast.com/openapi.json
npx @openapitools/openapi-generator-cli generate -i skedcast-openapi.json -g python -o ./skedcast-python
kiota generate -l python -d skedcast-openapi.json -c SkedCastClient -o ./skedcast-kiota- API keys and the REST API are included from Studio, and MCP access for AI clients from Solo. See the pricing page for the current plans.
OpenAPI document contents#
| Part of the document | What it gives a generated client |
|---|---|
servers | The base URL, https://api.skedcast.com/v1. |
operationId | A unique name for each operation, such as createPost or listClients. |
parameters | A required Idempotency-Key header on writes, and cursor and limit query parameters on lists (limit runs from 1 to 100). |
security | Two schemes: ApiKey, an HTTP bearer key, and OAuth2, the authorization code flow with PKCE for third-party apps and agents. |
x-required-scope | The scope an operation needs, for example clients.read on the list of clients. |
responses | The success body, and for 4xx answers a shared problem response with the media type application/problem+json. |
Keep types current#
"scripts": {
"api:types": "openapi-typescript https://skedcast.com/openapi.json -o ./skedcast-api.d.ts",
"api:check": "openapi-typescript https://skedcast.com/openapi.json -o ./skedcast-api.d.ts --check",
"test:ts": "tsc --noEmit"
}TypeScript settings#
{
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "Bundler",
"noUncheckedIndexedAccess": true
}
}What a generated client does not do#
- Retries, timeouts and backoff: see conventions.
- The Idempotency-Key on writes: you pass it at each call.
- Plan and scope checks: a key with too few scopes gets
403 insufficient_scope; see scopes. - Events: results arrive through webhooks, and an AI agent can use the MCP server.
Verify#
POST /posts/preview checks a post without scheduling it and needs no Idempotency-Key. POST /posts/bulk with validateOnly: true dry-runs a batch. Neither checks plan limits or pacing. Fields are in the API reference.
Troubleshoot#
| Answer | Cause | Fix |
|---|---|---|
401 | The key is missing or invalid | Check the header your middleware sets |
403 insufficient_scope | The key lacks a scope | Read x-required-scope for the operation and add it to the key |
422 validation_failed | The body is invalid | errors names each bad path and message |
429 | A request budget ran out | Wait the seconds in Retry-After |
Next steps and reference links#
- Quickstart, authentication and scopes.
- API reference, conventions and the OpenAPI 3.1 guide.
- Schedule posts via API in plain REST.
- The developer docs home: every reference page and guide in one index.
Sources#
- openapi-typescript, command line and openapi-fetch, with its middleware and auth, all read 22 November 2026.
- OpenAPI Generator generators list and installation, read 22 November 2026.
- Kiota overview and TypeScript quickstart, read 22 November 2026.
- OpenAPI Specification 3.1.1, read 22 November 2026. The SkedCast routes and headers come from the OpenAPI document. Next review: 9 February 2027.