Get media

Returns the current state of one media library asset. Use it to check whether an upload is ready before publishing with media IDs.
https://api.unipost.dev
GET/v1/media/:media_id
Authorization
In header ยท Bearer <token>
Path
string

Authorization

AuthorizationBearer <token>In header
Workspace API key.

Path Params

media_idstring
Media library ID returned from the reserve call.

Response Body

200
idstring
Media library ID.
statusstring
Media lifecycle state. Poll until uploaded before passing the ID to a publish request.
Valuespending | uploaded | attached | deleted
content_typestring
Resolved media MIME type.
size_bytesnumber
Stored file size in bytes.
401
error.codestring
Usually "UNAUTHORIZED" or "NOT_FOUND".
error.normalized_codestring
Lowercase alias such as "unauthorized" or "not_found".
error.messagestring
Human-readable error message.
request_idstring
Request identifier for debugging and support.
404
error.codestring
Usually "UNAUTHORIZED" or "NOT_FOUND".
error.normalized_codestring
Lowercase alias such as "unauthorized" or "not_found".
error.messagestring
Human-readable error message.
request_idstring
Request identifier for debugging and support.
500
error.codestring
Usually "UNAUTHORIZED" or "NOT_FOUND".
error.normalized_codestring
Lowercase alias such as "unauthorized" or "not_found".
error.messagestring
Human-readable error message.
request_idstring
Request identifier for debugging and support.
Deleted media: after a post reaches a final status, UniPost keeps uploaded media for the plan retention window, then removes the R2 object and the media row after every usage for that media is due. Scheduled, draft, queued, publishing, and processing posts keep their media until they finish.