Quickstart: your first scheduled post
Five calls take you from an API key to a scheduled post, in three steps: two to find a brand and an account, one to create the post, and two to preview and schedule it. A sixth, in step 4, watches it go live. Every example has a curl and a TypeScript tab.
#Before you start
- A Postbroad account: start free.
- One connected network. The network guides show how.
- An API key. Make one in the app: Settings, then API, then Create API key. The key is shown once, so copy it then. Authentication says what a key can do.
Export the key so the examples can use it:
export POSTBROAD_TOKEN=prk_...Every write carries an Idempotency-Key. Repeat the call with the same key and you get the first
answer back, so a retry after a network error never creates a second post.
#1. Find a brand and a connected channel
In the API, a connected account on a network is a channel of a brand.
curl -H "Authorization: Bearer $POSTBROAD_TOKEN" "https://app.postbroad.com/v1/brands"
curl -H "Authorization: Bearer $POSTBROAD_TOKEN" "https://app.postbroad.com/v1/channels"const API = "https://app.postbroad.com/v1";
const auth = { Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}` };
const brands = await (await fetch(`${API}/brands`, { headers: auth })).json();
const channels = await (await fetch(`${API}/channels`, { headers: auth })).json();Take a brandId from the first answer and the id of a channel of that brand from the second.
#2. Create the post
curl -X POST "https://app.postbroad.com/v1/posts" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: first-post-0001" \
-H "Content-Type: application/json" \
-d '{
"brandId": "<brandId>",
"baseText": "Hello from the API",
"destinations": [{ "channelId": "<channelId>", "scheduledAt": "2026-12-21T09:00:00Z" }]
}'const post = await (
await fetch(`${API}/posts`, {
method: "POST",
headers: { ...auth, "Idempotency-Key": crypto.randomUUID(), "Content-Type": "application/json" },
body: JSON.stringify({
brandId: "<brandId>",
baseText: "Hello from the API",
destinations: [{ channelId: "<channelId>", scheduledAt: "2026-12-21T09:00:00Z" }],
}),
})
).json();The answer is the post with its current revision and one entry per destination under
deliveries. A draft always saves; problems are listed, not refused. The time in the example is
tomorrow at 09:00 UTC.
#3. Preview, then commit
Scheduling is two steps so that nothing happens that you have not seen. The preview writes
nothing and returns what would be sent where, the preflight result and a signed receipt. Send
the revision the create call returned and the mode you intend to use. A schedule preview reads
each destination's scheduledAt; to send at once, preview with "mode": "publish_now" and commit
the receipt to POST /v1/posts/{postId}/publish-now instead.
curl -X POST "https://app.postbroad.com/v1/posts/<postId>/preview" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "mode": "schedule", "expectedRevision": <revision> }'const preview = await (
await fetch(`${API}/posts/${post.id}/preview`, {
method: "POST",
headers: { ...auth, "Content-Type": "application/json" },
body: JSON.stringify({ mode: "schedule", expectedRevision: post.revision }),
})
).json();
if (preview.blocked) throw new Error("Preflight found problems; read preview.destinations");If blocked is true, read destinations[].problems and fix the content. Otherwise commit with the
receipt:
curl -X POST "https://app.postbroad.com/v1/posts/<postId>/schedule" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: first-post-0002" \
-H "Content-Type: application/json" \
-d '{ "receipt": "<receipt from the preview>" }'const result = await (
await fetch(`${API}/posts/${post.id}/schedule`, {
method: "POST",
headers: { ...auth, "Idempotency-Key": crypto.randomUUID(), "Content-Type": "application/json" },
body: JSON.stringify({ receipt: preview.receipt }),
})
).json();The outcome is scheduled, publishing or in_review. in_review means the brand needs an
approval first: a person gets the review link, and the post is scheduled once it is approved. If
the content changed after the preview, the call answers 409 preview_stale; preview again.
#4. Watch it
curl -H "Authorization: Bearer $POSTBROAD_TOKEN" "https://app.postbroad.com/v1/posts/<postId>"const current = await (await fetch(`${API}/posts/${post.id}`, { headers: auth })).json();Each delivery has its own state:
| State | What it means |
|---|---|
scheduled | Waiting for its time. |
sending | Going out to the network now. |
published | Live, with the post's address in providerUrl. |
failed | The network refused it; lastErrorCode says why. Only failed deliveries are retried. |
unknown | The network gave no clear answer. It is never retried by a machine, because the post may be live. |
Postbroad never reports published without evidence from the network. Every state is in the
concepts. To be told instead of polling, add a
webhook for delivery.published and delivery.failed.
#Next steps
- Concepts: brands, channels, posts, deliveries and what live means.
- Webhooks: be told when a post goes live or fails.
- MCP server: let an agent do this for you.
Last generated 23 Nov 2026, from the contracts the API runs on.