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.