API reference

Posts

Drafts, posts and their per-channel variants. One post fans out to up to 20 channels; every write is validated against platform rules and the brand design system.

Drafts, posts and their per-channel variants. One post fans out to up to 20 channels; every write is validated against platform rules and the brand design system.

Method Endpoint Summary
POST /v1/workspaces/{ws}/validate Validate a draft (dry run)
POST /v1/workspaces/{ws}/posts:batch Bulk actions
GET /v1/workspaces/{ws}/posts List posts
POST /v1/workspaces/{ws}/posts Create a post (draft)
GET /v1/posts List posts across all accessible workspaces
GET /v1/posts/{id} Get a post
PATCH /v1/posts/{id} Update a post
DELETE /v1/posts/{id} Delete (archive) a post
GET /v1/posts/{id}/revisions Revision history
POST /v1/posts/{id}/revisions/{number}/restore Restore a revision
POST /v1/posts/{id}/lock Take or renew the edit lock
DELETE /v1/posts/{id}/lock Release the edit lock
GET /v1/workspaces/{ws}/views List saved views
POST /v1/workspaces/{ws}/views Save a view
PATCH /v1/views/{id} Update a saved view
DELETE /v1/views/{id} Delete a saved view

Validate a draft (dry run)#

POST/v1/workspaces/{ws}/validate

Same body as create; never persists. Returns structured issues with codes, paths, limits and hints. Every write validates again.

Auth: API key (Authorization: Bearer obx_live_…). Requires scope posts:read with workspace role owner / admin / editor / contributor / viewer / agent.

Path parameters

Name Required Description
ws yes Workspace id (ws_…) or slug

Headers

Name Required Description
Idempotency-Key no Replays within 24 h return the original response.

Request body

Field Type Description
base object
base.text string Text shared by every variant that does not customize it.
base.media array of MediaRef
variants * array of VariantInput
variants[].channel_id * string ch_ id from GET /v1/workspaces/{ws}/channels
variants[].post_type string One of the channel capabilities post_types (text, image, carousel, video, reel, story, thread, document, short, photo, update, offer, event). Inferred when omitted.
variants[].text string | null Custom text for this channel; null inherits base.text.
variants[].thread array | null Thread parts (X, Threads). Each part is validated against the per-part limit.
variants[].media array | null
variants[].options object Platform options from the capabilities options map, e.g. first_comment, title, privacy_level, made_for_kids, board_id, ai_disclosure.
schedule object Requested time. Without posts:approve this is stored as proposed_at and confirmed on approval.
schedule.mode string exact: use at; queue: next free queue slot; suggest: next good slot; none: unscheduled. One of: "exact", "queue", "suggest", "none".
schedule.at string ISO-8601 or natural language ("tomorrow 9am", "+2d", "fri 17:30 ET"). Workspace timezone unless a zone is given.
submit_for_review boolean true → status in_review; otherwise draft.
is_idea boolean Save as an unscheduled idea (Ideas tab).
labels array of string
campaign_id string | null
agent_meta AgentMeta Shown to reviewers next to the draft and stored for analytics.
agent_meta.run_id string Your run id; lands in the audit log for tracing.
agent_meta.model string
agent_meta.confidence number
agent_meta.rationale string
agent_meta.sources array of string
agent_meta.ai_generated_media boolean Drives platform AI-disclosure flags.
followups array of object Drip follow-up comments posted on our own post after it goes live, per channel (X: self-replies).
followups[].delay * string | integer After publish: "+30m", "+2h", "+1d" or minutes (1 min – 30 days).
followups[].text * string
followups[].channel_ids array of string Limit to these channels; all when omitted.

Schema: PostInput

Response 200 — ValidationResult. Errors: RFC 9457 Problem with a stable code (error codes).

curl -X POST "https://api.outboxer.dev/v1/workspaces/acme/validate" \
  -H "Authorization: Bearer $OUTBOXER_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "base": {
    "text": "Our autumn roast lands Tuesday!"
  },
  "variants": [
    {
      "channel_id": "ch_01j9zq3k8m5v2b7x4c6n1p0rx1"
    }
  ]
}'

Bulk actions#

POST/v1/workspaces/{ws}/posts:batch

Up to 100 items, each with its own result (207 on partial failure). Actions: create {post}, submit, approve {schedule}, request_changes {note}, schedule/reschedule {mode, at}, shift {by: "+2h"}, queue, unschedule, archive, label {add, remove}.

Auth: API key (Authorization: Bearer obx_live_…). Requires scope drafts:write; each item is then checked like its single-post call (submit needs posts:submit, approve posts:approve, schedule posts:publish) and reports its own result.

Path parameters

Name Required Description
ws yes Workspace id (ws_…) or slug

Headers

Name Required Description
Idempotency-Key no Replays within 24 h return the original response.

Request body

Field Type Description
items array

Response 200 — Object. Errors: RFC 9457 Problem with a stable code (error codes).

curl -X POST "https://api.outboxer.dev/v1/workspaces/acme/posts:batch" \
  -H "Authorization: Bearer $OUTBOXER_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "items": [
    {
      "action": "create",
      "post": {
        "base": {
          "text": "Day 1 of launch week"
        },
        "variants": [
          {
            "channel_id": "ch_01j9zq3k8m5v2b7x4c6n1p0rx1"
          }
        ]
      }
    },
    {
      "action": "submit",
      "post_id": "post_01j9zq3k8m5v2b7x4c6n1p0r9s"
    }
  ]
}'

List posts#

GET/v1/workspaces/{ws}/posts

Filters: tab (ideas, drafts, in_review, scheduled, published, failed, archived), status, channel (ids or providers), author_type, agent, campaign, label, validation (valid|errors|warnings), q, from, to, due_within_hours. sort: due | -scheduled_at | created_at | -created_at. include=metrics adds each published post's latest results summed across channels (needs analytics:read).

Auth: API key (Authorization: Bearer obx_live_…). Checks, depending on the request: scope posts:read with workspace role owner / admin / editor / contributor / viewer / agent; scope analytics:read with workspace role owner / admin / editor / contributor / viewer / agent.

Path parameters

Name Required Description
ws yes Workspace id (ws_…) or slug

Query parameters

Name Required Description
tab no
status no
channel no
author_type no
agent no
campaign no
label no Only posts with this label.
validation no
q no Search text.
from no ISO-8601 date-time (range is [from, to)).
to no ISO-8601 date-time (range is [from, to)).
due_within_hours no
sort no
include no Related data to embed.
fields no Sparse fieldset, e.g. id,status.
limit no Page size (default 50, max 200).
cursor no Opaque cursor from next_cursor.

Response 200 — List. Errors: RFC 9457 Problem with a stable code (error codes).

curl -X GET "https://api.outboxer.dev/v1/workspaces/acme/posts?tab=drafts" \
  -H "Authorization: Bearer $OUTBOXER_API_KEY"

Create a post (draft)#

POST/v1/workspaces/{ws}/posts

One call creates the post and its variants. Lands as draft (or in_review with submit_for_review). Without posts:approve, a requested time is stored as proposed_at. Agents: always send Idempotency-Key.

Auth: API key (Authorization: Bearer obx_live_…). Requires scope drafts:write (role owner / admin / editor / contributor / agent); with submit_for_review: true also posts:submit. A requested time is kept as proposed_at unless the key holds posts:approve.

Path parameters

Name Required Description
ws yes Workspace id (ws_…) or slug

Headers

Name Required Description
Idempotency-Key no Replays within 24 h return the original response.

Request body

Field Type Description
base object
base.text string Text shared by every variant that does not customize it.
base.media array of MediaRef
variants * array of VariantInput
variants[].channel_id * string ch_ id from GET /v1/workspaces/{ws}/channels
variants[].post_type string One of the channel capabilities post_types (text, image, carousel, video, reel, story, thread, document, short, photo, update, offer, event). Inferred when omitted.
variants[].text string | null Custom text for this channel; null inherits base.text.
variants[].thread array | null Thread parts (X, Threads). Each part is validated against the per-part limit.
variants[].media array | null
variants[].options object Platform options from the capabilities options map, e.g. first_comment, title, privacy_level, made_for_kids, board_id, ai_disclosure.
schedule object Requested time. Without posts:approve this is stored as proposed_at and confirmed on approval.
schedule.mode string exact: use at; queue: next free queue slot; suggest: next good slot; none: unscheduled. One of: "exact", "queue", "suggest", "none".
schedule.at string ISO-8601 or natural language ("tomorrow 9am", "+2d", "fri 17:30 ET"). Workspace timezone unless a zone is given.
submit_for_review boolean true → status in_review; otherwise draft.
is_idea boolean Save as an unscheduled idea (Ideas tab).
labels array of string
campaign_id string | null
agent_meta AgentMeta Shown to reviewers next to the draft and stored for analytics.
agent_meta.run_id string Your run id; lands in the audit log for tracing.
agent_meta.model string
agent_meta.confidence number
agent_meta.rationale string
agent_meta.sources array of string
agent_meta.ai_generated_media boolean Drives platform AI-disclosure flags.
followups array of object Drip follow-up comments posted on our own post after it goes live, per channel (X: self-replies).
followups[].delay * string | integer After publish: "+30m", "+2h", "+1d" or minutes (1 min – 30 days).
followups[].text * string
followups[].channel_ids array of string Limit to these channels; all when omitted.

Schema: PostInput

Response 201 — Post. Errors: RFC 9457 Problem with a stable code (error codes).

curl -X POST "https://api.outboxer.dev/v1/workspaces/acme/posts" \
  -H "Authorization: Bearer $OUTBOXER_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "base": {
    "text": "Our autumn roast lands Tuesday: cocoa, cherry and slow mornings.",
    "media": [
      "med_01j9zq3k8m5v2b7x4c6n1p0r9s"
    ]
  },
  "variants": [
    {
      "channel_id": "ch_01j9zq3k8m5v2b7x4c6n1p0rx1"
    },
    {
      "channel_id": "ch_01j9zq3k8m5v2b7x4c6n1p0rl2",
      "text": "A new single-origin joins the lineup on Tuesday. Tasting notes: cocoa and cherry."
    }
  ],
  "labels": [
    "product"
  ],
  "campaign_id": "cmp_01j9zq3k8m5v2b7x4c6n1p0r9s",
  "schedule": {
    "mode": "exact",
    "at": "tuesday 9am"
  },
  "submit_for_review": true
}'

List posts across all accessible workspaces#

GET/v1/posts

Same filters as the workspace list plus workspace (comma-separated ids).

Auth: API key (Authorization: Bearer obx_live_…). Checks, depending on the request: scope posts:read with workspace role owner / admin / editor / contributor / viewer / agent; scope analytics:read with workspace role owner / admin / editor / contributor / viewer / agent.

Query parameters

Name Required Description
workspace no
tab no
status no
from no ISO-8601 date-time (range is [from, to)).
to no ISO-8601 date-time (range is [from, to)).
sort no

Response 200 — List. Errors: RFC 9457 Problem with a stable code (error codes).

curl -X GET "https://api.outboxer.dev/v1/posts?workspace=acme" \
  -H "Authorization: Bearer $OUTBOXER_API_KEY"

Get a post#

GET/v1/posts/{id}

include=comments,approvals,media,channels. ETag header carries the version.

Auth: API key (Authorization: Bearer obx_live_…). Requires scope posts:read with workspace role owner / admin / editor / contributor / viewer / agent.

Path parameters

Name Required Description
id yes Post id (post_…).

Query parameters

Name Required Description
include no Related data to embed.
fields no Sparse fieldset, e.g. id,status.

Response 200 — Post. Errors: RFC 9457 Problem with a stable code (error codes).

curl -X GET "https://api.outboxer.dev/v1/posts/post_01j9zq3k8m5v2b7x4c6n1p0r9s?include=stats" \
  -H "Authorization: Bearer $OUTBOXER_API_KEY"

Update a post#

PATCH/v1/posts/{id}

Requires If-Match (ETag or version). Content edits invalidate approvals and return approved/scheduled posts to in_review, unless only the time changes and the editor can approve. Agents can edit their own drafts until approved or while no human holds the edit lock.

Auth: API key (Authorization: Bearer obx_live_…). Requires scope drafts:write. Editors and above edit any draft; contributors and agents edit their own drafts until approved, unless a human holds the edit lock.

Path parameters

Name Required Description
id yes Post id (post_…).

Headers

Name Required Description
If-Match yes ETag or version from your last read (optimistic concurrency).

Request body

Field Type Description
base object
base.text string Text shared by every variant that does not customize it.
base.media array of MediaRef
variants * array of VariantInput
variants[].channel_id * string ch_ id from GET /v1/workspaces/{ws}/channels
variants[].post_type string One of the channel capabilities post_types (text, image, carousel, video, reel, story, thread, document, short, photo, update, offer, event). Inferred when omitted.
variants[].text string | null Custom text for this channel; null inherits base.text.
variants[].thread array | null Thread parts (X, Threads). Each part is validated against the per-part limit.
variants[].media array | null
variants[].options object Platform options from the capabilities options map, e.g. first_comment, title, privacy_level, made_for_kids, board_id, ai_disclosure.
schedule object Requested time. Without posts:approve this is stored as proposed_at and confirmed on approval.
schedule.mode string exact: use at; queue: next free queue slot; suggest: next good slot; none: unscheduled. One of: "exact", "queue", "suggest", "none".
schedule.at string ISO-8601 or natural language ("tomorrow 9am", "+2d", "fri 17:30 ET"). Workspace timezone unless a zone is given.
submit_for_review boolean true → status in_review; otherwise draft.
is_idea boolean Save as an unscheduled idea (Ideas tab).
labels array of string
campaign_id string | null
agent_meta AgentMeta Shown to reviewers next to the draft and stored for analytics.
agent_meta.run_id string Your run id; lands in the audit log for tracing.
agent_meta.model string
agent_meta.confidence number
agent_meta.rationale string
agent_meta.sources array of string
agent_meta.ai_generated_media boolean Drives platform AI-disclosure flags.
followups array of object Drip follow-up comments posted on our own post after it goes live, per channel (X: self-replies).
followups[].delay * string | integer After publish: "+30m", "+2h", "+1d" or minutes (1 min – 30 days).
followups[].text * string
followups[].channel_ids array of string Limit to these channels; all when omitted.

Schema: PostInput

Response 200 — Post. Errors: RFC 9457 Problem with a stable code (error codes).

curl -X PATCH "https://api.outboxer.dev/v1/posts/post_01j9zq3k8m5v2b7x4c6n1p0r9s" \
  -H "Authorization: Bearer $OUTBOXER_API_KEY" \
  -H 'If-Match: "ds:3"' \
  -H "Content-Type: application/json" \
  -d '{
  "base": {
    "text": "Our autumn roast lands Tuesday — pre-orders open now."
  }
}'

Delete (archive) a post#

DELETE/v1/posts/{id}

Archives and soft-deletes. For published posts, ?from_network=true deletes them from the networks.

Auth: API key (Authorization: Bearer obx_live_…). Requires scope drafts:write and edit rights on the post (see Update a post). With from_network=true (delete published posts from the platforms) also posts:publish.

Path parameters

Name Required Description
id yes Post id (post_…).

Query parameters

Name Required Description
from_network no

Response 200 — Object. Errors: RFC 9457 Problem with a stable code (error codes).

curl -X DELETE "https://api.outboxer.dev/v1/posts/post_01j9zq3k8m5v2b7x4c6n1p0r9s" \
  -H "Authorization: Bearer $OUTBOXER_API_KEY"

Revision history#

GET/v1/posts/{id}/revisions

Every save with author (human or agent) and full snapshot.

Auth: API key (Authorization: Bearer obx_live_…). Requires scope posts:read with workspace role owner / admin / editor / contributor / viewer / agent.

Path parameters

Name Required Description
id yes Post id (post_…).

Response 200 — List. Errors: RFC 9457 Problem with a stable code (error codes).

curl -X GET "https://api.outboxer.dev/v1/posts/post_01j9zq3k8m5v2b7x4c6n1p0r9s/revisions" \
  -H "Authorization: Bearer $OUTBOXER_API_KEY"

Restore a revision#

POST/v1/posts/{id}/revisions/{number}/restore

Requires If-Match.

Auth: API key (Authorization: Bearer obx_live_…). Requires scope posts:read with workspace role owner / admin / editor / contributor / viewer / agent.

Path parameters

Name Required Description
id yes Post id (post_…).
number yes Revision or version number.

Headers

Name Required Description
Idempotency-Key no Replays within 24 h return the original response.
If-Match yes ETag or version from your last read (optimistic concurrency).

Response 201 — Post. Errors: RFC 9457 Problem with a stable code (error codes).

curl -X POST "https://api.outboxer.dev/v1/posts/post_01j9zq3k8m5v2b7x4c6n1p0r9s/revisions/2/restore" \
  -H "Authorization: Bearer $OUTBOXER_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H 'If-Match: "ds:3"'

Take or renew the edit lock#

POST/v1/posts/{id}/lock

Humans only; 5-minute heartbeat. Agents cannot PATCH while a human holds it.

Auth: API key (Authorization: Bearer obx_live_…). Requires scope posts:read with workspace role owner / admin / editor / contributor / viewer / agent.

Path parameters

Name Required Description
id yes Post id (post_…).

Headers

Name Required Description
Idempotency-Key no Replays within 24 h return the original response.

Response 200 — Post. Errors: RFC 9457 Problem with a stable code (error codes).

curl -X POST "https://api.outboxer.dev/v1/posts/post_01j9zq3k8m5v2b7x4c6n1p0r9s/lock" \
  -H "Authorization: Bearer $OUTBOXER_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Release the edit lock#

DELETE/v1/posts/{id}/lock

Auth: API key (Authorization: Bearer obx_live_…). Requires scope posts:read with workspace role owner / admin / editor / contributor / viewer / agent.

Path parameters

Name Required Description
id yes Post id (post_…).

Response 200 — Post. Errors: RFC 9457 Problem with a stable code (error codes).

curl -X DELETE "https://api.outboxer.dev/v1/posts/post_01j9zq3k8m5v2b7x4c6n1p0r9s/lock" \
  -H "Authorization: Bearer $OUTBOXER_API_KEY"

List saved views#

GET/v1/workspaces/{ws}/views

Your views plus views shared with the workspace.

Auth: API key (Authorization: Bearer obx_live_…). Requires scope posts:read with workspace role owner / admin / editor / contributor / viewer / agent.

Path parameters

Name Required Description
ws yes Workspace id (ws_…) or slug

Response 200 — List. Errors: RFC 9457 Problem with a stable code (error codes).

curl -X GET "https://api.outboxer.dev/v1/workspaces/acme/views" \
  -H "Authorization: Bearer $OUTBOXER_API_KEY"

Save a view#

POST/v1/workspaces/{ws}/views

definition holds GET /posts filters (tab, status, channel, campaign, label, q, …).

Auth: API key (Authorization: Bearer obx_live_…). Requires scope posts:read with workspace role owner / admin / editor / contributor / viewer / agent.

Path parameters

Name Required Description
ws yes Workspace id (ws_…) or slug

Headers

Name Required Description
Idempotency-Key no Replays within 24 h return the original response.

Request body

Field Type Description
name string
shared boolean
definition object

Response 201 — Object. Errors: RFC 9457 Problem with a stable code (error codes).

curl -X POST "https://api.outboxer.dev/v1/workspaces/acme/views" \
  -H "Authorization: Bearer $OUTBOXER_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "example",
  "shared": true,
  "definition": {}
}'

Update a saved view#

PATCH/v1/views/{id}

Owner only.

Auth: API key (Authorization: Bearer obx_live_…).

Path parameters

Name Required Description
id yes Saved view id (view_…).

Request body

Field Type Description
name string
shared boolean
definition object

Response 200 — Object. Errors: RFC 9457 Problem with a stable code (error codes).

curl -X PATCH "https://api.outboxer.dev/v1/views/view_01j9zq3k8m5v2b7x4c6n1p0r9s" \
  -H "Authorization: Bearer $OUTBOXER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "example",
  "shared": true,
  "definition": {}
}'

Delete a saved view#

DELETE/v1/views/{id}

Owner only.

Auth: API key (Authorization: Bearer obx_live_…).

Path parameters

Name Required Description
id yes Saved view id (view_…).

Response 200 — Object. Errors: RFC 9457 Problem with a stable code (error codes).

curl -X DELETE "https://api.outboxer.dev/v1/views/view_01j9zq3k8m5v2b7x4c6n1p0r9s" \
  -H "Authorization: Bearer $OUTBOXER_API_KEY"