API reference

Media

Upload (direct, URL import or presigned), processing, platform derivatives and usage.

Upload (direct, URL import or presigned), processing, platform derivatives and usage.

Method Endpoint Summary
GET /v1/workspaces/{ws}/media Search the media library
POST /v1/workspaces/{ws}/media Upload media directly
POST /v1/workspaces/{ws}/media/uploads Start a presigned upload
POST /v1/workspaces/{ws}/media/import Import media from a URL
GET /v1/media/{id} Get media
PATCH /v1/media/{id} Update media
POST /v1/media/{id}/complete Complete a presigned upload
POST /v1/media/{id}/optimize Generate platform derivatives
GET /v1/media/{id}/usage Which posts use this asset

Search the media library#

GET/v1/workspaces/{ws}/media

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

Query parameters

Name Required Description
type no
tag no
folder no
q no Search text.

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

curl -X GET "https://api.outboxer.dev/v1/workspaces/acme/media?type=charge" \
  -H "Authorization: Bearer $OUTBOXER_API_KEY"

Upload media directly#

POST/v1/workspaces/{ws}/media

multipart/form-data file (≤ 20 MB) or JSON {data: base64, filename}. Fields: alt_text, tags[], focal_point {x,y}, ai_generated, source_prompt, keep_original. keep_original: true (images) publishes the uploaded file byte for byte wherever the platform accepts it as is (format, size, aspect ratio), and optimizes it only where it doesn't (derivative warning original_not_accepted); the default optimizes for each platform (crop to preset, resize, compress, strip metadata). Identical bytes return the existing asset, with keep_original updated if sent. ?wait=true holds up to 20 s for processing.

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

Path parameters

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

Query parameters

Name Required Description
wait no true blocks up to 20 s until processing finishes.

Headers

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

Request body (application/json or multipart/form-data)

Field Type Description
file string (binary)
alt_text string
focal_point object
ai_generated boolean
keep_original boolean

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

curl -X POST "https://api.outboxer.dev/v1/workspaces/acme/media" \
  -H "Authorization: Bearer $OUTBOXER_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "file": "example",
  "alt_text": "example",
  "focal_point": {},
  "ai_generated": true,
  "keep_original": true
}'

Start a presigned upload#

POST/v1/workspaces/{ws}/media/uploads

For large files and video. PUT bytes to upload.url, then POST /media/{id}/complete.

Auth: API key (Authorization: Bearer obx_live_…). Requires scope media:write with workspace role owner / admin / editor / contributor / 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
filename string
content_type string
bytes integer

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

curl -X POST "https://api.outboxer.dev/v1/workspaces/acme/media/uploads" \
  -H "Authorization: Bearer $OUTBOXER_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "filename": "launch.mp4",
  "content_type": "video/mp4",
  "bytes": 48211002
}'

Import media from a URL#

POST/v1/workspaces/{ws}/media/import

SSRF-guarded (public http(s) only), content type sniffed.

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

Path parameters

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

Query parameters

Name Required Description
wait no true blocks up to 20 s until processing finishes.

Headers

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

Request body

Field Type Description
url string
alt_text string

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

curl -X POST "https://api.outboxer.dev/v1/workspaces/acme/media/import" \
  -H "Authorization: Bearer $OUTBOXER_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://images.example.com/roast.jpg",
  "alt_text": "A bag of autumn roast coffee on a wooden table"
}'

Get media#

GET/v1/media/{id}

Status, metadata, preview URLs and derivatives. ?wait=true to block until ready (≤ 20 s).

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

Path parameters

Name Required Description
id yes Media asset id (med_…).

Query parameters

Name Required Description
wait no true blocks up to 20 s until processing finishes.

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

curl -X GET "https://api.outboxer.dev/v1/media/med_01j9zq3k8m5v2b7x4c6n1p0r9s?wait=true" \
  -H "Authorization: Bearer $OUTBOXER_API_KEY"

Update media#

PATCH/v1/media/{id}

alt_text, tags, folder, focal_point, ai_generated, keep_original (images: publish the original file where accepted, see media.store), provenance, poster_at_s (video cover time in seconds).

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

Path parameters

Name Required Description
id yes Media asset id (med_…).

Request body

Field Type Description
alt_text string
focal_point object
keep_original boolean
poster_at_s number

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

curl -X PATCH "https://api.outboxer.dev/v1/media/med_01j9zq3k8m5v2b7x4c6n1p0r9s" \
  -H "Authorization: Bearer $OUTBOXER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "alt_text": "example",
  "focal_point": {},
  "keep_original": true,
  "poster_at_s": 1
}'

Complete a presigned upload#

POST/v1/media/{id}/complete

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

Path parameters

Name Required Description
id yes Media asset id (med_…).

Query parameters

Name Required Description
wait no true blocks up to 20 s until processing finishes.

Headers

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

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

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

Generate platform derivatives#

POST/v1/media/{id}/optimize

{"targets":[{"channel_id":"ch_…","placement":"feed","post_type":"reel"},{"preset":"linkedin:landscape"}],"focal_point":{"x":0.5,"y":0.35}} → per-target status and warnings (e.g. upscaled > 2×). Only needed to pre-warm or override crops.

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

Path parameters

Name Required Description
id yes Media asset id (med_…).

Headers

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

Request body

Field Type Description
targets array
focal_point object

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

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

Which posts use this asset#

GET/v1/media/{id}/usage

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

Path parameters

Name Required Description
id yes Media asset id (med_…).

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

curl -X GET "https://api.outboxer.dev/v1/media/med_01j9zq3k8m5v2b7x4c6n1p0r9s/usage" \
  -H "Authorization: Bearer $OUTBOXER_API_KEY"