Pick the package that fits your stack
Official SDKs for JavaScript, Python, PHP, Go, Ruby, Java, Kotlin, .NET, Rust, Swift, Dart, Elixir wrap the hosted FoPost API, plus a CLI for scripts and CI. The PHP core and Laravel wrapper are MIT-licensed and can also publish straight from your own server with your own platform credentials. The WordPress plugin connects a self-hosted site to your workspace, and the live OpenAPI spec covers anything else.
npm install @fopost/sdk
import { FoPost } from '@fopost/sdk';
const client = new FoPost({ apiKey: process.env.FOPOST_API_KEY });
const [workspace] = await client.workspaces.list();
const accounts = await client.accounts.list({ workspaceId: workspace.id });
const post = await client.posts.create({
workspaceId: workspace.id,
status: 'scheduled',
scheduleAt: '2026-09-01T09:00:00Z',
content: [{ text: 'Shipped a new release today.' }],
accounts: accounts.map((a) => ({ id: a.id })),
});