Contents

API reference

Media

API reference descriptions are provided in English to preserve the exact published contract.

List media objects and scan/retention state

GET /v1/accounts/{AC}/media

Required scope: `media:read`.

Parameters

Parameters
NameTypeRequiredDescription
limitquery · integer (1–100)
cursorquery · string (max 2048 chars)
ACpath · string (AC… SID)yes

Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors.

Upload or fetch media

POST /v1/accounts/{AC}/media

Upload a file (multipart) or have Ship Messages fetch one from a URL. Use the returned media SID in a message. Files are scanned before they can be sent. Required scope: `media:write`.

Parameters

Parameters
NameTypeRequiredDescription
ACpath · string (AC… SID)yes
Request body (4 fields)
Request body
NameTypeRequiredDescription
declaredMimestring (max 255 chars)
filenamestring
type"AUTO" | "IMAGE" | "AUDIO" | "VIDEO" | "DOCUMENT" | "STICKER"
urlstring (max 4096 chars)yes

Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors.

Create a template-header resumable upload

POST /v1/accounts/{AC}/media/uploads

Required scope: `media:write`.

Parameters

Parameters
NameTypeRequiredDescription
ACpath · string (AC… SID)yes
Request body (1 fields)
Request body
NameTypeRequiredDescription
mediaSidstring (ME… SID)yes

Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors.

Fetch media metadata

GET /v1/accounts/{AC}/media/{ME}

Fetch a media object's type, size, scan result and expiry. Required scope: `media:read`.

Parameters

Parameters
NameTypeRequiredDescription
ACpath · string (AC… SID)yes
MEpath · string (ME… SID)yes

Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors.

Delete media

DELETE /v1/accounts/{AC}/media/{ME}

Required scope: `media:write`.

Parameters

Parameters
NameTypeRequiredDescription
ACpath · string (AC… SID)yes
MEpath · string (ME… SID)yes

Errors: 400, 401, 403, 404, 409, 422, 429, 500, 503 — see errors.