Pick the package that fits your stack
The TypeScript SDK wraps the hosted FoPost API with full types. The PHP core, Laravel wrapper, and WordPress plugin are MIT-licensed and publish straight from your own server with your own platform credentials. Anything else generates from the OpenAPI spec.
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.', position: 0 }],
accounts: accounts.map((a) => ({ id: a.id })),
});TypeScript, fully typed
Every endpoint, request body, and response has a type. Autocomplete does the reading.
PHP without an account
The core and Laravel packages run on your server and need no hosted account.
OpenAPI spec
Served from the API itself, so a generated client never drifts from production.
The whole API as typed methods
@fopost/sdk covers posts, deliveries, accounts, workspaces, labels, and the AI caption, rewrite, and repurpose helpers. It runs in Node and edge runtimes, retries transient errors, and surfaces rate-limit headers so you can back off. The MCP server is built on it.
Read the SDK docsconst deliveries = await client.posts.deliveries(post.id);
for (const d of deliveries) {
console.log(d.platform, d.status, d.externalUrl);
}
const health = await client.accounts.health(account.id);
console.log(health);Every resource
One client object, one method per endpoint, typed end to end.
Retries and backoff
Network blips and 429s are retried before an error reaches you.
Same core as MCP
@fopost/mcp uses this SDK, so agent and script behave the same way.
Publish from PHP with your own credentials
fopost/social-core is a standalone publishing library with an adapter per network and zero framework dependencies. fopost/social-laravel adds a service provider, facade, events, and queue support. Neither talks to the hosted product; you bring platform credentials and it posts directly.
See the PHP packagesuse FoPostLaravelFacades${BRAND.name};
$result = FoPost::linkedin('Shipped a new release today.');
if ($result->success) {
logger()->info("Published: {$result->externalUrl}");
}MIT, on your server
Composer install, no account, no key, no usage limits from us.
Laravel wiring
Config, facade, events, and queued publishing out of the box.
Same formatting rules
Length limits and media handling match the hosted adapters.
A plugin for WordPress, a spec for the rest
The WordPress plugin is built on the PHP core, so publishing a blog post to your social accounts is a checkbox in the editor. For any other language, the OpenAPI spec is served live from the API; point a generator at it and get a client that matches what is deployed today.
Start buildingcurl https://api.fopost.com/v1/openapi.json -o openapi.json
npx @openapitools/openapi-generator-cli generate \
-i openapi.json -g python -o ./clientWordPress plugin
Install from the plugin directory and share posts as you publish them.
Live spec
GET /v1/openapi.json always describes the running API.
Any language
Python, Go, Ruby, or anything with an OpenAPI generator.
SDKs questions, answered
Which packages need an account?
What is the difference between the PHP package and the TypeScript SDK?
Is the TypeScript SDK open source?
Does the SDK work in the browser?
Does the WordPress plugin use the hosted service?
How do I get a client in another language?
Build on the SDKs today
Starting is free and the full API is included. Create a key and make your first call in minutes.
Get your API key