early access Social SDK Cloud will run the platform apps and token refresh for you. It isn't open yet. Join the waitlist →

Post to X, LinkedIn, YouTube and five more platforms with one TypeScript call.

Open source (MIT). Each platform returns its own result: published, processing, or failed with the reason.

Post your first update
npm i @opencoredev/social-sdk

direct adapters, no middleman:

What you get back

One outcome per target. Not a boolean. The actual state: "published", "processing", "accepted", "failed", "unknown", and more, with the reason when there is one.

Each target is checked before anything is sent. A text-only post aimed at Instagram fails local preparation, and no target is dispatched.

Switch on the state, and TypeScript tells you when a new one isn't handled.

import type { DeliveryOutcome } from "@opencoredev/social-sdk";

function renderOutcome(outcome: DeliveryOutcome): string {
  const target = `${outcome.account.platform}/${outcome.account.accountId}`;

  switch (outcome.state) {
    case "published":
      return `${target}: published (${outcome.post.postId})`;
    case "scheduled":
      return `${target}: scheduled (${outcome.job.jobId})`;
    case "accepted":
      return `${target}: accepted`;
    case "processing":
      return `${target}: processing`;
    case "failed":
      return `${target}: failed (${outcome.code})`;
    case "unknown":
      return `${target}: status unknown (${outcome.reason})`;
    case "cancelled":
      return `${target}: cancelled`;
    case "not-submitted":
      return `${target}: not submitted (${outcome.reason})`;
    default:
      return unreachable(outcome);
  }
}

function unreachable(value: never): never {
  throw new Error(`Unhandled delivery outcome: ${String(value)}`);
}
← from render-outcomes.ts, typechecked in CI
your app social.posts.publish({ content, targets: accounts , }) published ✓ published ✓ processing… published ✓ failed + reason accepted published ✓ each destination reports back on its own. no rolled-up "all good." your app social.posts.publish({ content, targets: accounts , }) published ✓ published ✓ processing… published ✓ failed + reason accepted published ✓ each destination reports back on its own. no rolled-up "all good."

Pick your setup

What changes is who registers the platform apps and keeps the tokens.

free, open source

Direct

Use your own platform apps. You handle each platform's app review and tokens, and pay any API fees the platform charges.

Platform guides →
their account, their pricing

Managed backend

A provider connects the accounts and holds the tokens, on its own account and pricing. Postiz can also be self-hosted, but then you register your own platform apps.

early access, not open yet

Social SDK Cloud

Our hosted version will run the platform apps and token refresh for you. Join the waitlist to hear when it opens.

Join the waitlist →

Not sure which one? Compare the routes in the docs.

What it does.

Publishing

Pick the accounts, make one call, get a result for each. Retry with the same idempotency key and a durable store, and the post isn't sent twice.

no double posts

Reads & analytics

Read your posts and their metrics where the platform offers them. A number the platform doesn't return is left out, not shown as zero.

no made-up zeros

Comments & messages

Read and reply to comments and DMs where the platform's API allows it. Each adapter lists what it supports, so you can check before you call.

where platforms allow

Deterministic testing

A mock backend with fixed scenarios, fixtures and a fake clock, so your tests never call a real platform.

runs offline

thanks to our sponsors

open source, MIT licensed, and on npm today. if it saves you a weekend, star it on GitHub. logos and colors live on the brand page.