Media
Upload and import media, organize the library, and read each file's renditions per network.
14 operations, every one needs an API key. Read the concepts first.
Every call goes to https://app.postbroad.com; see Authentication and the error catalogue.
| Endpoint | What it does | Scope |
|---|---|---|
POST /v1/media/uploads | Start an upload: a pending session (1 h) and where to send the bytes | media.upload |
PUT /v1/media/uploads/{uploadId}/content | The bytes of an upload whose target is api, streamed to storage with a bounded memory allowance | media.upload |
POST /v1/media/uploads/{uploadId}/complete | Bind the stored bytes; the media container then ingests them | media.upload |
GET /v1/media/uploads/{uploadId} | Poll an upload until it is ingested or rejected | any key |
POST /v1/media/imports | Add media from a shared link or a stock library | media.upload |
GET /v1/media/stock | Search the stock photo libraries this installation offers | media.upload |
GET /v1/media | The media library | any key |
GET /v1/media-facets | Folders and tags of the library with counts, and how many files are unused or lack alt text | any key |
GET /v1/media/{assetId} | One asset with signed URLs for its thumbnail and original | any key |
PATCH /v1/media/{assetId} | Change alt text, folder or tags | media.manage |
POST /v1/media/bulk-delete | Delete assets that no scheduled or draft post uses | media.manage |
GET /v1/media/{assetId}/renditions | Renditions of an asset per media profile, with status | any key |
POST /v1/media/{assetId}/alt-suggestion | Suggest alt text for an image from the image itself; nothing is saved | media.manage |
GET /v1/media/{assetId}/usage | Posts that use an asset | any key |
#Operations
#Start an upload: a pending session (1 h) and where to send the bytes
POST/v1/media/uploads
Operation createUpload. Needs a key with the scope media.upload.
Accepts an Idempotency-Key header.
Add ?dry_run=true where the operation supports it to get a preview and write nothing.
Request body: CreateUploadInput
| Field | Type | Required | Description |
|---|---|---|---|
mime | "image/jpeg" or "image/png" or "image/webp" or "image/gif" or "image/avif" or "video/mp4" or "video/quicktime" or "video/webm" or "application/pdf" or "audio/mpeg" or "audio/mp4" | yes | |
size | integer | yes | |
sha256 | string | yes | |
filename | string or null | no | |
brandId | string (uuid) or null | no | |
sourceAssetId | string (uuid) | no | |
clientRender | ClientRender | no |
Response 201: CreateUploadResult. The session and the upload target
Errors: 400 bad_request, 401 unauthenticated, 403 forbidden, 404 not_found, 409 request_in_progress, 413 payload_too_large, 415 unsupported_media_type, 422 validation_failed, 422 idempotency_key_reused, 429 rate_limited, 500 internal, 503 unavailable.
curl -X POST "https://app.postbroad.com/v1/media/uploads" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"mime": "image/jpeg",
"size": 0,
"sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"filename": "string",
"brandId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"sourceAssetId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"clientRender": {
"v": 1,
"tool": "string",
"action": "as_is",
"networks": [
"string"
],
"facts": {
"width": 0,
"height": 0,
"durationSeconds": 0,
"frameRate": 0,
"videoCodec": "string",
"audioCodec": "string",
"hdr": false
},
"actions": [
"string"
],
"timings": {}
}
}'const res = await fetch("https://app.postbroad.com/v1/media/uploads", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"mime": "image/jpeg",
"size": 0,
"sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"filename": "string",
"brandId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"sourceAssetId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"clientRender": {
"v": 1,
"tool": "string",
"action": "as_is",
"networks": [
"string"
],
"facts": {
"width": 0,
"height": 0,
"durationSeconds": 0,
"frameRate": 0,
"videoCodec": "string",
"audioCodec": "string",
"hdr": false
},
"actions": [
"string"
],
"timings": {}
}
}),
});
const data = await res.json();{
"upload": {
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"brandId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"status": "pending",
"store": "fs",
"declaredMime": "string",
"declaredSize": 0,
"declaredSha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"filename": "string",
"expiresAt": "2026-10-21T09:00:00Z",
"mediaAssetId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"error": "string"
},
"target": {
"kind": "presigned",
"method": "PUT",
"url": "string",
"headers": {}
}
}#The bytes of an upload whose target is api, streamed to storage with a bounded memory allowance
PUT/v1/media/uploads/{uploadId}/content
Operation uploadMediaContent. Needs a key with the scope media.upload.
Accepts an Idempotency-Key header.
Add ?dry_run=true where the operation supports it to get a preview and write nothing.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
uploadId | path | yes | string (uuid) |
Response 200: MediaUploadView. The session
Errors: 400 bad_request, 401 unauthenticated, 403 forbidden, 404 not_found, 409 request_in_progress, 409 conflict, 413 payload_too_large, 415 unsupported_media_type, 422 idempotency_key_reused, 429 rate_limited, 500 internal, 503 unavailable.
curl -X PUT "https://app.postbroad.com/v1/media/uploads/<uploadId>/content" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: $(uuidgen)"const res = await fetch("https://app.postbroad.com/v1/media/uploads/<uploadId>/content", {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
},
});
const data = await res.json();{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"brandId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"status": "pending",
"store": "fs",
"declaredMime": "string",
"declaredSize": 0,
"declaredSha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"filename": "string",
"expiresAt": "2026-10-21T09:00:00Z",
"mediaAssetId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"error": "string"
}#Bind the stored bytes; the media container then ingests them
POST/v1/media/uploads/{uploadId}/complete
Operation completeUpload. Needs a key with the scope media.upload.
Accepts an Idempotency-Key header.
Add ?dry_run=true where the operation supports it to get a preview and write nothing.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
uploadId | path | yes | string (uuid) |
Response 200: MediaUploadView or CompleteUploadDryRun. Pure operation preview when dry_run=true; no mutation is performed
Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 409 request_in_progress, 409 conflict, 422 idempotency_key_reused, 422 validation_failed, 429 rate_limited, 500 internal.
curl -X POST "https://app.postbroad.com/v1/media/uploads/<uploadId>/complete" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: $(uuidgen)"const res = await fetch("https://app.postbroad.com/v1/media/uploads/<uploadId>/complete", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
},
});
const data = await res.json();{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"brandId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"status": "pending",
"store": "fs",
"declaredMime": "string",
"declaredSize": 0,
"declaredSha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"filename": "string",
"expiresAt": "2026-10-21T09:00:00Z",
"mediaAssetId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"error": "string"
}#Poll an upload until it is ingested or rejected
GET/v1/media/uploads/{uploadId}
Operation getUpload. Any API key of the organization may call it.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
uploadId | path | yes | string (uuid) |
Response 200: MediaUploadView. The session
Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 429 rate_limited, 500 internal.
curl -X GET "https://app.postbroad.com/v1/media/uploads/<uploadId>" \
-H "Authorization: Bearer $POSTBROAD_TOKEN"const res = await fetch("https://app.postbroad.com/v1/media/uploads/<uploadId>", {
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
},
});
const data = await res.json();{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"brandId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"status": "pending",
"store": "fs",
"declaredMime": "string",
"declaredSize": 0,
"declaredSha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"filename": "string",
"expiresAt": "2026-10-21T09:00:00Z",
"mediaAssetId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"error": "string"
}#Add media from a shared link or a stock library
POST/v1/media/imports
Operation importMedia. Needs a key with the scope media.upload.
The file is read once through the safe fetch into the ordinary upload; the media worker checks and ingests it. Wait on the upload like any other.
Accepts an Idempotency-Key header.
Add ?dry_run=true where the operation supports it to get a preview and write nothing.
Request body: ImportMediaInput
| Field | Type | Required | Description |
|---|---|---|---|
brandId | string (uuid) or null | no | |
source | object | yes |
Response 201: MediaUploadView. The upload, received
Errors: 400 bad_request, 401 unauthenticated, 403 forbidden, 404 not_found, 409 request_in_progress, 413 payload_too_large, 422 validation_failed, 422 idempotency_key_reused, 422 rule_violation, 429 rate_limited, 500 internal, 503 unavailable.
curl -X POST "https://app.postbroad.com/v1/media/imports" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"brandId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"source": {
"kind": "link",
"url": "string"
}
}'const res = await fetch("https://app.postbroad.com/v1/media/imports", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"brandId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"source": {
"kind": "link",
"url": "string"
}
}),
});
const data = await res.json();{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"brandId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"status": "pending",
"store": "fs",
"declaredMime": "string",
"declaredSize": 0,
"declaredSha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"filename": "string",
"expiresAt": "2026-10-21T09:00:00Z",
"mediaAssetId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"error": "string"
}#Search the stock photo libraries this installation offers
GET/v1/media/stock
Operation searchStockMedia. Needs a key with the scope media.upload.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
q | query | no | string | |
provider | query | no | "unsplash" or "pexels" | |
page | query | no | integer |
Response 200: StockSearch. Photos
Errors: 400 bad_request, 401 unauthenticated, 403 forbidden, 404 not_found, 422 validation_failed, 422 rule_violation, 429 rate_limited, 500 internal, 503 unavailable.
curl -X GET "https://app.postbroad.com/v1/media/stock" \
-H "Authorization: Bearer $POSTBROAD_TOKEN"const res = await fetch("https://app.postbroad.com/v1/media/stock", {
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
},
});
const data = await res.json();{
"providers": [
"unsplash"
],
"results": [
{
"provider": "unsplash",
"id": "string",
"description": "string",
"thumbUrl": "string",
"fullUrl": "string",
"width": 0,
"height": 0,
"credit": {
"name": "string",
"url": "string"
},
"sourceUrl": "string"
}
]
}#The media library
GET/v1/media
Operation listMedia. Any API key of the organization may call it.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
cursor | query | no | string | |
limit | query | no | integer | |
brandId | query | no | string (uuid) | |
kind | query | no | "image" or "video" or "document" or "audio" | |
folder | query | no | string | |
tag | query | no | string | |
missingAlt | query | no | "true" or "false" | |
unused | query | no | "true" or "false" | |
q | query | no | string | |
createdAfter | query | no | string (date-time) |
Response 200: MediaAssetPage. A page of assets
Errors: 400 bad_request, 401 unauthenticated, 403 forbidden, 404 not_found, 422 validation_failed, 429 rate_limited, 500 internal.
curl -X GET "https://app.postbroad.com/v1/media" \
-H "Authorization: Bearer $POSTBROAD_TOKEN"const res = await fetch("https://app.postbroad.com/v1/media", {
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
},
});
const data = await res.json();{
"data": [
{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"brandId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"workspaceId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"kind": "image",
"mime": "string",
"sizeBytes": 0,
"sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"filename": "string",
"altText": "string",
"folder": "string",
"tags": [
"string"
],
"width": 0,
"height": 0,
"durationMs": 0,
"provenance": {},
"aiGenerated": false,
"thumbnail": {
"url": "https://example.invalid/post/1",
"expiresAt": "2026-10-21T09:00:00Z"
},
"original": {
"url": "https://example.invalid/post/1",
"expiresAt": "2026-10-21T09:00:00Z"
},
"renditions": {
"ready": 0,
"pending": 0,
"failed": 0
},
"createdAt": "2026-10-21T09:00:00Z",
"revision": 0
}
],
"nextCursor": "string"
}#Folders and tags of the library with counts, and how many files are unused or lack alt text
GET/v1/media-facets
Operation getMediaFacets. Any API key of the organization may call it.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
brandId | query | no | string (uuid) |
Response 200: MediaFacets. The facets
Errors: 400 bad_request, 401 unauthenticated, 403 forbidden, 404 not_found, 422 validation_failed, 429 rate_limited, 500 internal.
curl -X GET "https://app.postbroad.com/v1/media-facets" \
-H "Authorization: Bearer $POSTBROAD_TOKEN"const res = await fetch("https://app.postbroad.com/v1/media-facets", {
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
},
});
const data = await res.json();{
"total": 0,
"unused": 0,
"missingAlt": 0,
"folders": [
{
"name": "string",
"count": 0
}
],
"tags": [
{
"name": "string",
"count": 0
}
]
}#One asset with signed URLs for its thumbnail and original
GET/v1/media/{assetId}
Operation getMediaAsset. Any API key of the organization may call it.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
assetId | path | yes | string (uuid) |
Response 200: MediaAssetView. The asset
Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 429 rate_limited, 500 internal.
curl -X GET "https://app.postbroad.com/v1/media/<assetId>" \
-H "Authorization: Bearer $POSTBROAD_TOKEN"const res = await fetch("https://app.postbroad.com/v1/media/<assetId>", {
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
},
});
const data = await res.json();{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"brandId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"workspaceId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"kind": "image",
"mime": "string",
"sizeBytes": 0,
"sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"filename": "string",
"altText": "string",
"folder": "string",
"tags": [
"string"
],
"width": 0,
"height": 0,
"frameCount": 0,
"durationMs": 0,
"provenance": {},
"aiGenerated": false,
"canCrop": false,
"thumbnail": {
"url": "https://example.invalid/post/1",
"expiresAt": "2026-10-21T09:00:00Z"
},
"original": {
"url": "https://example.invalid/post/1",
"expiresAt": "2026-10-21T09:00:00Z"
},
"renditions": {
"ready": 0,
"pending": 0,
"failed": 0
},
"createdAt": "2026-10-21T09:00:00Z",
"revision": 0
}#Change alt text, folder or tags
PATCH/v1/media/{assetId}
Operation updateMediaAsset. Needs a key with the scope media.manage.
Accepts an Idempotency-Key header.
Add ?dry_run=true where the operation supports it to get a preview and write nothing.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
assetId | path | yes | string (uuid) |
Request body: UpdateMediaAssetInput
| Field | Type | Required | Description |
|---|---|---|---|
expectedRevision | integer | yes | |
altText | string or null | no | |
folder | string or null | no | |
tags | string[] | no |
Response 200: MediaAssetView or UpdateMediaAssetDryRun. Pure operation preview when dry_run=true; no mutation is performed
Errors: 400 bad_request, 401 unauthenticated, 403 forbidden, 404 not_found, 409 request_in_progress, 409 revision_mismatch, 422 validation_failed, 422 idempotency_key_reused, 429 rate_limited, 500 internal.
curl -X PATCH "https://app.postbroad.com/v1/media/<assetId>" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"expectedRevision": 0,
"altText": "string",
"folder": "string",
"tags": [
"string"
]
}'const res = await fetch("https://app.postbroad.com/v1/media/<assetId>", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"expectedRevision": 0,
"altText": "string",
"folder": "string",
"tags": [
"string"
]
}),
});
const data = await res.json();{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"brandId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"workspaceId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"kind": "image",
"mime": "string",
"sizeBytes": 0,
"sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"filename": "string",
"altText": "string",
"folder": "string",
"tags": [
"string"
],
"width": 0,
"height": 0,
"frameCount": 0,
"durationMs": 0,
"provenance": {},
"aiGenerated": false,
"canCrop": false,
"thumbnail": {
"url": "https://example.invalid/post/1",
"expiresAt": "2026-10-21T09:00:00Z"
},
"original": {
"url": "https://example.invalid/post/1",
"expiresAt": "2026-10-21T09:00:00Z"
},
"renditions": {
"ready": 0,
"pending": 0,
"failed": 0
},
"createdAt": "2026-10-21T09:00:00Z",
"revision": 0
}#Delete assets that no scheduled or draft post uses
POST/v1/media/bulk-delete
Operation bulkDeleteMedia. Needs a key with the scope media.manage.
Accepts an Idempotency-Key header.
Add ?dry_run=true where the operation supports it to get a preview and write nothing.
Request body: BulkDeleteMediaInput
| Field | Type | Required | Description |
|---|---|---|---|
assetIds | string (uuid)[] | yes |
Response 200: BulkDeleteMediaResult or BulkDeleteMediaDryRun. Pure operation preview when dry_run=true; no mutation is performed
Errors: 400 bad_request, 400 idempotency_key_required, 401 unauthenticated, 403 forbidden, 404 not_found, 409 request_in_progress, 422 validation_failed, 422 idempotency_key_reused, 429 rate_limited, 500 internal.
curl -X POST "https://app.postbroad.com/v1/media/bulk-delete" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"assetIds": [
"0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01"
]
}'const res = await fetch("https://app.postbroad.com/v1/media/bulk-delete", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"assetIds": [
"0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01"
]
}),
});
const data = await res.json();{
"deleted": [
"0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01"
],
"inUse": [
{
"assetId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"posts": 0
}
]
}#Renditions of an asset per media profile, with status
GET/v1/media/{assetId}/renditions
Operation listMediaRenditions. Any API key of the organization may call it.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
assetId | path | yes | string (uuid) |
Response 200: MediaRenditionList. The renditions
Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 429 rate_limited, 500 internal.
curl -X GET "https://app.postbroad.com/v1/media/<assetId>/renditions" \
-H "Authorization: Bearer $POSTBROAD_TOKEN"const res = await fetch("https://app.postbroad.com/v1/media/<assetId>/renditions", {
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
},
});
const data = await res.json();{
"data": [
{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"profileName": "string",
"profileHash": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"status": "queued",
"mime": "string",
"width": 0,
"height": 0,
"durationMs": 0,
"sizeBytes": 0,
"error": "string",
"url": {
"url": "https://example.invalid/post/1",
"expiresAt": "2026-10-21T09:00:00Z"
}
}
]
}#Suggest alt text for an image from the image itself; nothing is saved
POST/v1/media/{assetId}/alt-suggestion
Operation suggestMediaAlt. Needs a key with the scope media.manage.
Accepts an Idempotency-Key header.
Add ?dry_run=true where the operation supports it to get a preview and write nothing.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
assetId | path | yes | string (uuid) |
Response 200: AltSuggestion. The suggestion
Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 409 request_in_progress, 415 unsupported_media_type, 422 idempotency_key_reused, 422 budget_exhausted, 429 rate_limited, 500 internal, 503 unavailable.
curl -X POST "https://app.postbroad.com/v1/media/<assetId>/alt-suggestion" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: $(uuidgen)"const res = await fetch("https://app.postbroad.com/v1/media/<assetId>/alt-suggestion", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
},
});
const data = await res.json();{
"assetId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"suggestion": "string",
"model": "string"
}#Posts that use an asset
GET/v1/media/{assetId}/usage
Operation getMediaUsage. Any API key of the organization may call it.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
assetId | path | yes | string (uuid) |
Response 200: MediaUsage. The posts
Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 429 rate_limited, 500 internal.
curl -X GET "https://app.postbroad.com/v1/media/<assetId>/usage" \
-H "Authorization: Bearer $POSTBROAD_TOKEN"const res = await fetch("https://app.postbroad.com/v1/media/<assetId>/usage", {
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
},
});
const data = await res.json();{
"assetId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"posts": [
{
"postId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"brandId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"versionNo": 0,
"state": "draft",
"excerpt": "string"
}
]
}Schemas
Every type the operations above use
#AltSuggestion
| Field | Type | Required | Description |
|---|---|---|---|
assetId | string (uuid) | yes | |
suggestion | string | yes | |
model | string or null | yes |
#BulkDeleteMediaDryRun
| Field | Type | Required | Description |
|---|---|---|---|
resources | object[] | yes | |
effects | object[] | yes | |
content | object[] | yes | |
details | object[] | yes | |
preflight | PreflightResult | yes | |
pendingChecks | string[] | yes | |
cost | object | yes | |
operationId | "bulkDeleteMedia" | yes |
#BulkDeleteMediaInput
| Field | Type | Required | Description |
|---|---|---|---|
assetIds | string (uuid)[] | yes |
#BulkDeleteMediaResult
| Field | Type | Required | Description |
|---|---|---|---|
deleted | string (uuid)[] | yes | |
inUse | object[] | yes |
#ClientRender
| Field | Type | Required | Description |
|---|---|---|---|
v | 1 | yes | |
tool | string | yes | |
action | "as_is" or "remux" or "convert" | yes | |
networks | string[] | yes | |
facts | object | yes | |
actions | string[] | yes | |
timings | map of integer | yes |
#CompleteUploadDryRun
| Field | Type | Required | Description |
|---|---|---|---|
resources | object[] | yes | |
effects | object[] | yes | |
content | object[] | yes | |
details | object[] | yes | |
preflight | PreflightResult | yes | |
pendingChecks | string[] | yes | |
cost | object | yes | |
operationId | "completeUpload" | yes |
#CostEstimate
| Field | Type | Required | Description |
|---|---|---|---|
unit | string | yes | |
amountMicros | integer | yes | |
currency | "USD" | yes | |
billedBy | "postbroad" or "third_party" | yes |
#CreateUploadDryRun
| Field | Type | Required | Description |
|---|---|---|---|
resources | object[] | yes | |
effects | object[] | yes | |
content | object[] | yes | |
details | object[] | yes | |
preflight | PreflightResult | yes | |
pendingChecks | string[] | yes | |
cost | object | yes | |
operationId | "createUpload" | yes |
#CreateUploadInput
| Field | Type | Required | Description |
|---|---|---|---|
mime | "image/jpeg" or "image/png" or "image/webp" or "image/gif" or "image/avif" or "video/mp4" or "video/quicktime" or "video/webm" or "application/pdf" or "audio/mpeg" or "audio/mp4" | yes | |
size | integer | yes | |
sha256 | string | yes | |
filename | string or null | no | |
brandId | string (uuid) or null | no | |
sourceAssetId | string (uuid) | no | |
clientRender | ClientRender | no |
#CreateUploadResult
| Field | Type | Required | Description |
|---|---|---|---|
upload | MediaUploadView | yes | |
target | UploadTarget | yes |
#DestinationKind
Type: "feed" or "board" or "subreddit" or "chat" or "channel" or "community" or "group" or "forum" or "list" or "publication" or "organization" or "playlist"
#DispatchingRef
A delivery that had already started (or gone live) when the change committed; it may still publish.
| Field | Type | Required | Description |
|---|---|---|---|
deliveryId | string (uuid) | yes | |
channelId | string (uuid) | yes | |
state | "sending" or "accepted" or "processing" or "published" or "unknown" | yes | |
claimedAt | string (date-time) or null | yes | |
versionNo | integer | yes |
#ErrorCode
Type: "bad_request" or "org_required" or "unauthenticated" or "reauth_required" or "invalid_credentials" or "forbidden" or "not_found" or "method_not_allowed" or "idempotency_key_required" or "idempotency_key_reused" or "request_in_progress" or "revision_mismatch" or "preview_required" or "preview_stale" or "dispatch_started" or "duplicate_risk_unacknowledged" or "conflict" or "validation_failed" or "rule_violation" or "budget_exhausted" or "limit_reached" or "organization_frozen" or "approval_required" or "unsupported_media_type" or "payload_too_large" or "rate_limited" or "internal" or "unavailable" or "busy" or "timeout"
#ImportMediaDryRun
| Field | Type | Required | Description |
|---|---|---|---|
resources | object[] | yes | |
effects | object[] | yes | |
content | object[] | yes | |
details | object[] | yes | |
preflight | PreflightResult | yes | |
pendingChecks | string[] | yes | |
cost | object | yes | |
operationId | "importMedia" | yes |
#ImportMediaInput
| Field | Type | Required | Description |
|---|---|---|---|
brandId | string (uuid) or null | no | |
source | object | yes |
#MediaAssetPage
| Field | Type | Required | Description |
|---|---|---|---|
data | MediaAssetView[] | yes | |
nextCursor | string or null | yes |
#MediaAssetView
| Field | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | |
brandId | string (uuid) or null | yes | |
workspaceId | string (uuid) or null | yes | |
kind | MediaKind | yes | |
mime | string | yes | |
sizeBytes | integer | yes | |
sha256 | string | yes | |
filename | string or null | yes | |
altText | string or null | yes | |
folder | string or null | yes | |
tags | string[] | yes | |
width | integer or null | yes | |
height | integer or null | yes | |
frameCount | integer or null | no | |
durationMs | integer or null | yes | |
provenance | map of any | yes | |
aiGenerated | boolean | yes | |
canCrop | boolean | no | |
thumbnail | SignedUrl or null | yes | |
original | SignedUrl or null | yes | |
renditions | object | yes | |
createdAt | string (date-time) | yes | |
revision | integer | yes |
#MediaFacets
| Field | Type | Required | Description |
|---|---|---|---|
total | integer | yes | |
unused | integer | yes | |
missingAlt | integer | yes | |
folders | object[] | yes | |
tags | object[] | yes |
#MediaKind
Type: "image" or "video" or "document" or "audio"
#MediaRenditionList
| Field | Type | Required | Description |
|---|---|---|---|
data | MediaRenditionView[] | yes |
#MediaRenditionView
| Field | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | |
profileName | string or null | yes | |
profileHash | string | yes | |
status | "queued" or "running" or "ready" or "failed" or "evicted" | yes | |
mime | string or null | yes | |
width | integer or null | yes | |
height | integer or null | yes | |
durationMs | integer or null | yes | |
sizeBytes | integer or null | yes | |
error | string or null | yes | |
url | SignedUrl or null | yes |
#MediaUploadView
| Field | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | |
brandId | string (uuid) or null | yes | |
status | "pending" or "uploaded" or "ingested" or "rejected" or "expired" | yes | |
store | "fs" or "s3" | yes | |
declaredMime | string | yes | |
declaredSize | integer | yes | |
declaredSha256 | string | yes | |
filename | string or null | yes | |
expiresAt | string (date-time) | yes | |
mediaAssetId | string (uuid) or null | yes | |
error | string or null | yes |
#MediaUsage
| Field | Type | Required | Description |
|---|---|---|---|
assetId | string (uuid) | yes | |
posts | object[] | yes |
#Network
Type: "facebook" or "instagram" or "threads" or "linkedin" or "bluesky" or "x" or "tiktok" or "youtube" or "google_business_profile" or "reddit" or "telegram" or "discord" or "slack" or "pinterest" or "dribbble" or "mastodon" or "whop" or "twitch" or "kick" or "farcaster" or "vk" or "lemmy" or "mewe" or "nostr" or "listmonk" or "wordpress" or "medium" or "hashnode" or "devto" or "ghost" or "snapchat" or "odnoklassniki" or "tumblr" or "flickr" or "vimeo" or "dailymotion" or "soundcloud" or "beehiiv" or "discourse" or "circle" or "mighty_networks" or "viber" or "line" or "hatena_blog" or "wechat" or "kuaishou" or "zalo" or "band" or "pixelfed" or "misskey" or "peertube" or "hive" or "lens" or "moltbook" or "facebook_groups" or "facebook_profile" or "substack_notes" or "skool"
#PreflightResult
Type: object
#PreviewDestination
| Field | Type | Required | Description |
|---|---|---|---|
channelId | string (uuid) | yes | |
network | Network | yes | |
handle | string or null | yes | |
scheduledAt | string (date-time) or null | yes | |
payloadHash | string | yes | |
payload | PreviewPayload | yes | What will be sent to one destination, from the frozen payload model. |
manualHandoff | object | no | |
preflight | PreflightResult | yes | |
pendingChecks | string[] | yes | |
cost | CostEstimate[] | yes | |
verificationLevel | VerificationLevel | yes |
#PreviewPayload
What will be sent to one destination, from the frozen payload model.
| Field | Type | Required | Description |
|---|---|---|---|
v | 1 | yes | |
orgId | string (uuid) | yes | |
brandId | string (uuid) | yes | |
postVersionId | string (uuid) | yes | |
contentHash | string | yes | |
variantId | string (uuid) | yes | |
channelId | string (uuid) | yes | |
network | string | yes | |
connectorVersion | string | yes | |
destination | object | yes | |
intendedVisibility | "public" or "followers" or "private" or "draft" or "inbox" or "scheduled_native" | yes | |
aiLabel | boolean | yes | |
utm | map of string | yes | |
parts | object[] | yes |
#PreviewResult
| Field | Type | Required | Description |
|---|---|---|---|
receipt | string | yes | |
expiresAt | string (date-time) | yes | |
postId | string (uuid) | yes | |
versionNo | integer | yes | |
contentHash | string | yes | |
mode | "schedule" or "publish_now" | yes | |
blocked | boolean | yes | |
requiresReview | boolean | yes | |
destinations | PreviewDestination[] | yes | |
totalCost | CostEstimate[] | yes |
#Problem
The one error body of every route (RFC 9457 problem details with a stable code). Another organization's resource, a Postbroad-Org the member does not belong to and a resource outside a token's brand allowlist all answer 404 not_found, never 403.
| Field | Type | Required | Description |
|---|---|---|---|
type | string | yes | |
title | string | yes | |
status | integer | yes | |
code | ErrorCode | yes | |
detail | string | yes | |
requestId | string | yes | |
retryable | boolean | yes | |
errors | ProblemItem[] | no | |
preview | PreviewResult | no | |
currentRevision | integer | no | |
alreadyDispatching | DispatchingRef[] | no | |
limit | object | no | |
retryAfterSeconds | integer | no |
#ProblemItem
| Field | Type | Required | Description |
|---|---|---|---|
path | string | yes | |
rule | string | yes | |
message | string | yes | |
channelId | string (uuid) or null | no |
#SignedUrl
A signed media URL. Bearer access until it expires. In an answer that carries an ETag the URL is minted per fixed window: the expiry is rounded up to the next full hour plus one hour, and the signature is the same within that window, so the ETag changes only when the content does and polling with If-None-Match still gets 304.
| Field | Type | Required | Description |
|---|---|---|---|
url | string (uri) | yes | |
expiresAt | string (date-time) | yes |
#StockSearch
| Field | Type | Required | Description |
|---|---|---|---|
providers | "unsplash" or "pexels"[] | yes | |
results | object[] | yes |
#UpdateMediaAssetDryRun
| Field | Type | Required | Description |
|---|---|---|---|
resources | object[] | yes | |
effects | object[] | yes | |
content | object[] | yes | |
details | object[] | yes | |
preflight | PreflightResult | yes | |
pendingChecks | string[] | yes | |
cost | object | yes | |
operationId | "updateMediaAsset" | yes |
#UpdateMediaAssetInput
| Field | Type | Required | Description |
|---|---|---|---|
expectedRevision | integer | yes | |
altText | string or null | no | |
folder | string or null | no | |
tags | string[] | no |
#UploadTarget
Type: object
#VerificationLevel
Type: "full" or "url_only" or "accepted_no_readback" or "manual"
Last generated 21 Nov 2026, from the contracts the API runs on.