Skip to content
Reading with an AI assistant?View as MarkdownOpen in ClaudeOpen in ChatGPT

Guides

Social media TypeScript SDK

@skedcast/sdk is SkedCast's social media TypeScript SDK: a typed, fetch-based client over the REST API, and the same client that powers the SkedCast console. A public npm package is on the way; until then, the REST API and OpenAPI spec are the supported external interface.

Browse docs

5 min read

Construct the social media TypeScript SDK client#

Create one client with createSkedcast(). It supports three auth modes — a cookie session (first-party browser), an OAuth bearer token, or a Developer API key — all over an injectable fetch.

ts
import { createSkedcast } from "@skedcast/sdk";

const sk = createSkedcast({
  baseUrl: "https://api.skedcast.com/v1",
  apiKey: process.env.SKEDCAST_API_KEY, // sent as Authorization: Bearer sked_…
});

const { data } = await sk.clients.list({ limit: 10 });
API-key mode (server-side).

Resources & errors#

Every resource exposes typed methods (sk.posts.list(), sk.analytics.overview(), …) returning { data } (single) or { data, page } (list). Non-2xx responses throw a typed SkedcastApiError carrying status, code, category, detail, and correlationId, plus predicates like err.isRateLimited and err.isForbidden.

ts
import { SkedcastApiError } from "@skedcast/sdk";

try {
  await sk.posts.create({ clientId, content, targets, schedule });
} catch (err) {
  if (err instanceof SkedcastApiError && err.isRateLimited) {
    await wait(err.retryAfterSeconds ?? 1);
  } else throw err;
}
sdktypescript

FAQ

Can I install @skedcast/sdk from npm today?
Not yet — it's a first-party package right now. Build against the REST API and OpenAPI spec in the meantime; the public npm release is planned.

Ready to broadcast everywhere?

Sign up free — no credit card. You land on the Free plan, and you can start a one-time 7-day Studio trial from your workspace whenever you are ready. Connect your first accounts, import a batch, and watch one post fan out across every platform.