[ Docs ]
How the API works
Post, schedule and check how it went from your AI assistant or your own code, with the same rules as the dashboard.
01
Connect your AI with one URL
Add https://api.postatron.com/mcp to Claude, ChatGPT, Codex or any MCP client. You sign in to Postatron in your browser and approve it, so there is no key to copy.
Then ask in plain words: schedule a post, add it to a queue, check what went out, see how it did.
02
Or a key for your own code
For scripts, the CLI and your own apps, create an API key on the API & MCP page and send it as a Bearer token. Keys start ptn_ and are shown once: Postatron keeps only a fingerprint of each.
It covers posts and drafts, queues, media uploads, connected accounts, profiles and analytics.
03
Give each key only what it needs
A key can be limited to posts:read, posts:write, accounts:read and usage:read. A key with none ticked can do everything, so tick only what a bot needs.
04
The same checks as the dashboard
The API applies your plan's limits and each platform's rules before anything is sent. A request the platform would refuse is refused first, with a 422 that says why in plain words.
05
Rate limits, the same on every plan
Each minute you can make 30 writes, 60 reads and 120 upload sessions. Go over and the reply is 429, with a Retry-After header saying how many seconds to wait.
06
Webhooks: told as it happens
On Growth and Scale, add up to five https addresses on the API & MCP page, or through the API, and Postatron POSTs each a JSON event when a post publishes, partly publishes, fails or goes back to the drafts, and when an account connects, disconnects or needs reconnecting. Choose the events, or take them all.
Every request is signed in a Postatron-Signature header, an HMAC-SHA256 of the time and the body with the webhook's secret, so your server can check it came from us. One that is not answered with a 2xx is tried again for about 19 hours, and a webhook that fails 20 deliveries in a row is switched off until you switch it back on.
07
Retry without posting twice
A request that timed out may still have worked. Send an Idempotency-Key header with POST /v1/posts, or idempotency_key with create_post, and the same request sent again within 24 hours gets the first answer back, marked Idempotent-Replayed, without making a second post.
A refused request is not kept, so put it right and send it again with the same key.
08
Let your customers connect their own accounts
Building an app on Postatron? Make a profile for each customer with POST /v1/profiles, then a connect link with POST /v1/connect/sessions, and send the customer to it. A Postatron page says which site is asking, runs the platform's own sign-in, and needs no Postatron login.
Then the customer goes back to your redirect_url with status=connected and the account_id, or status=error. A link works until an account is connected through it, for an hour unless you ask for up to a day. Confirm what came of it with GET /v1/connect/sessions/{id}, since anyone can type a query string.
The page carries Postatron's name, not yours. Until Meta and TikTok finish reviewing Postatron's apps, it connects X, LinkedIn, YouTube and Bluesky accounts.
09
Keys for a team workspace
Create a key while you are working in a team's workspace and it works there: it posts to that team's accounts, only in the profiles you are allowed, and what it does appears in the team's activity under your name.
10
Switch anything off at once
Every key and connected app is listed on the API & MCP page with when it was last used. Revoke a key or disconnect an app and its next request is refused.
11
The full reference
Every endpoint, tool and command, with examples, lives on GitHub: