Get started
Quickstart
From an API key to a published post in five calls — check connectivity, validate, create a draft, approve and publish.
In about ten minutes you will:
- confirm who your key is and what it may do;
- check that the brand's social accounts can publish;
- validate a draft and read a machine-actionable issue;
- create the post, safely retryable;
- get it approved and published.
The responses below are trimmed examples for a coffee brand, Acme Coffee. Ids will differ on yours.
Note: Steps 1 to 4 never publish anything: validation is a dry run, and a draft or a post in review stays inside Outboxer until someone approves and schedules it. Only step 5 posts to the real accounts, and each published channel is charged from your credit balance (billing). To try things out without posting, stop after step 4 and archive the post (
POST /v1/posts/{id}/archive).
0. Get a key and set up your shell#
Create a key in the web app on the Agents page (an agent and its key), or as yourself under Settings → MCP connections, or with the API (authentication). Then:
export OB=https://api.outboxer.dev/v1
export OUTBOXER_API_KEY=obx_live_…
export WS=acme # workspace slug or ws_… idEvery request carries Authorization: Bearer $OUTBOXER_API_KEY. Send JSON, and you get JSON back.
1. Who am I?#
curl -s $OB/me -H "Authorization: Bearer $OUTBOXER_API_KEY"{
"principal": {
"type": "agent",
"id": "agt_01m4rexm9cf4cf2pa7vx86gyep",
"name": "Copy Agent",
"scopes": ["context:read", "design_system:read", "channels:read", "posts:read", "analytics:read",
"drafts:write", "media:write", "posts:submit", "campaigns:write", "billing:read"]
},
"workspaces": [
{
"id": "ws_01m4rexm9e27nzj8zpj9q60yz3", "slug": "acme", "name": "Acme Coffee", "role": "agent",
"abilities": ["context.read", "posts.read", "drafts.create", "drafts.edit_own", "comments.write", "posts.submit",
"channels.read", "design_system.read", "campaigns.manage", "media.read", "media.write", "analytics.read"]
}
]
}abilities lists exactly what this key may do in each workspace. This agent can draft and submit, but posts.approve
and posts.publish are missing: a human approves its work. See scopes & permissions.
2. Can this brand publish right now?#
curl -s $OB/workspaces/$WS/connections -H "Authorization: Bearer $OUTBOXER_API_KEY"{
"summary": { "channels": 9, "ready": 9, "needs_attention": 0, "disconnected": 0, "warnings": 0 },
"channels": [
{ "channel_id": "ch_01m4rexmartjzw77579m88sv91", "provider": "facebook",
"display_name": "Acme Coffee · Facebook Page", "ready": true, "problems": [], "warnings": [] },
"…"
],
"providers": ["…"], "pending_connect_links": [], "how_to_fix": { "reconnect": "…" }
}A channel with ready: false lists its problems, each with a code and a fix.
Connect links let an agent hand a broken account to its human owner.
3. Validate before you write#
Validation is a dry run that uses the same rules as every write. Here is a post that is too long for X:
curl -s -X POST $OB/workspaces/$WS/validate \
-H "Authorization: Bearer $OUTBOXER_API_KEY" -H "Content-Type: application/json" \
-d '{"base": {"text": "Our autumn roast lands Tuesday. Our autumn roast lands Tuesday. …"},
"variants": [{"channel_id": "ch_01m4rexma3gh0r4sh7zmcjb84p"}]}'{
"valid": false,
"issues": [
{
"severity": "error",
"code": "text_too_long",
"path": "base.text",
"message": "Text is 319 weighted_chars; X (Twitter) allows 280.",
"layer": "platform",
"channel_id": "ch_01m4rexma3gh0r4sh7zmcjb84p",
"limit": 280, "actual": 319, "unit": "weighted_chars",
"hint": "X counts each URL as 23 chars and CJK/emoji as 2; shorten by 39 or split into a thread."
}
]
}Every issue has a stable code, the JSON path to fix and a hint. An LLM can repair the draft and validate again.
Errors block approval. Warnings, such as a missing alt text, don't.
4. Create the post (safe to retry)#
One call creates the post and a variant per channel. Variants inherit base unless they override it.
submit_for_review: true sends the post straight to the review queue.
curl -s -i -X POST $OB/workspaces/$WS/posts \
-H "Authorization: Bearer $OUTBOXER_API_KEY" \
-H "Idempotency-Key: 7f3c2a52-4c0e-4b8a-9d0e-2c1f5a8e9b11" \
-H "Content-Type: application/json" \
-d '{
"base": { "text": "Our autumn roast lands Tuesday: cocoa, cherry and slow mornings." },
"variants": [
{ "channel_id": "ch_01m4rexma3gh0r4sh7zmcjb84p" },
{ "channel_id": "ch_01m4rexmafdshn85cfq9g7z68d",
"text": "A new single-origin joins the lineup on Tuesday. Tasting notes: cocoa and cherry." }
],
"labels": ["product"],
"submit_for_review": true
}'HTTP/1.1 201 Created
ETag: "post_01m4rey8a7ypkdspwdm00y1pek:1"
Location: https://api.outboxer.dev/v1/posts/post_01m4rey8a7ypkdspwdm00y1pek{
"id": "post_01m4rey8a7ypkdspwdm00y1pek",
"object": "post",
"status": "in_review",
"version": 1,
"labels": ["product"],
"author": { "type": "agent", "id": "agt_01m4rexm9cf4cf2pa7vx86gyep", "name": "Copy Agent" },
"variants": [
{ "id": "var_01m4rey8a8tn135a4bw84vpmw0", "channel_id": "ch_01m4rexma3gh0r4sh7zmcjb84p",
"publish_status": "pending", "validation": { "valid": true, "issues": [] } },
{ "id": "var_01m4rey8a9bjjtchqwqp2s5gzx", "channel_id": "ch_01m4rexmafdshn85cfq9g7z68d",
"publish_status": "pending", "validation": { "valid": true, "issues": [] } }
]
}What happens on a retry:
- Same key, same body (for example after a timeout): you get the same response, with
Idempotent-Replayed: true, and no duplicate post. - Same key, different body:
422 idempotency_key_reused.
Generate a fresh UUID for every new operation. uuidgen works on macOS and most Linux systems; otherwise use cat /proc/sys/kernel/random/uuid.
5. Approve and publish#
An agent key can't approve its own work:
{ "status": 403, "code": "missing_scope", "required_scope": "posts:approve",
"detail": "This key lacks the `posts:approve` scope required for `posts.approve`." }A reviewer approves the post in the web app's Review screen, or with a key that holds posts:approve and
posts:publish:
# Approve without a time, then publish immediately
curl -s -X POST $OB/posts/post_01m4rey8a7ypkdspwdm00y1pek/approve \
-H "Authorization: Bearer $REVIEWER_KEY" -H "Content-Type: application/json" -d '{"schedule": {"mode": "none"}}'
curl -s -X POST $OB/posts/post_01m4rey8a7ypkdspwdm00y1pek/publish-now \
-H "Authorization: Bearer $REVIEWER_KEY" -H "Idempotency-Key: $(uuidgen)"Instead of publishing now, you can schedule the post:
- for an exact time:
{"schedule": {"mode": "exact", "at": "tuesday 9am"}}; - into the channel's next free queue slot:
{"mode": "queue"}.
Then read the result:
curl -s $OB/posts/post_01m4rey8a7ypkdspwdm00y1pek -H "Authorization: Bearer $OUTBOXER_API_KEY"{
"id": "post_01m4rey8a7ypkdspwdm00y1pek",
"status": "published",
"published_at": "2026-10-12T16:25:47Z",
"variants": [
{ "channel_id": "ch_01m4rexma3gh0r4sh7zmcjb84p", "publish_status": "published",
"permalink": "https://x.com/acmecoffee/status/1845123456789012480", "published_at": "2026-10-12T16:25:47Z" },
{ "channel_id": "ch_01m4rexmafdshn85cfq9g7z68d", "publish_status": "published",
"permalink": "https://www.linkedin.com/feed/update/urn:li:share:7251234567890123456", "published_at": "2026-10-12T16:25:47Z" }
]
}In production, don't poll: subscribe to the variant.published, variant.failed and post.published
webhooks.
What's next#
- Run the same flow as a complete program in your language: code samples.
- Read brand context before drafting:
GET /v1/workspaces/{ws}/contextreturns the design system as a prompt, channel capabilities and free slots (reference). - Plan a campaign and fill it in one batch: agent workflows.
- Use Outboxer from Claude: MCP server.
- Check what publishing will cost:
GET /v1/posts/{id}/cost(billing).
