Skip to content

Guides

TypeScript SDK

@skedcast/sdk is a typed, fetch-based client over the REST API. It's the same client the SkedCast console uses. A public npm package is on the way; until then, the REST API + OpenAPI spec are the supported external interface.

Developer docs

5 min read

Construction

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.

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.

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.

Be first in line when SkedCast opens

Join the waitlist — agencies on it get early access and launch-day onboarding.