Reserve media upload

Creates a media library row and returns a presigned upload URL. After the PUT succeeds, poll GET/v1/media/:media_id until status is uploaded before using the media ID in POST/v1/posts.
https://api.unipost.dev
POST/v1/media
Authorization
In header ยท Bearer <token>
Request Body
string
string
number

Authorization

AuthorizationBearer <token>In header
Workspace API key.

Request Body

filenamestring
Original file name for the asset.
content_typestring
MIME type such as image/jpeg or video/mp4.
size_bytesnumber
Expected upload size in bytes.

Response Body

200
media_idstring
Media library ID to use in later publish calls.
upload_urlstring
Presigned storage URL for the raw file bytes.
statusstring
Media lifecycle state. Reserve responses start as pending; publish calls should wait for uploaded.
Valuespending | uploaded | attached | deleted
201
media_idstring
Media library ID to use in later publish calls.
upload_urlstring
Presigned storage URL for the raw file bytes.
statusstring
Media lifecycle state. Reserve responses start as pending; publish calls should wait for uploaded.
Valuespending | uploaded | attached | deleted
401
error.codestring
Usually "UNAUTHORIZED".
error.normalized_codestring
Lowercase alias such as "unauthorized".
error.messagestring
Human-readable error message.
request_idstring
Request identifier for debugging and support.
422
error.codestring
Usually "UNAUTHORIZED".
error.normalized_codestring
Lowercase alias such as "unauthorized".
error.messagestring
Human-readable error message.
request_idstring
Request identifier for debugging and support.
500
error.codestring
Usually "UNAUTHORIZED".
error.normalized_codestring
Lowercase alias such as "unauthorized".
error.messagestring
Human-readable error message.
request_idstring
Request identifier for debugging and support.
503
error.codestring
Usually "UNAUTHORIZED".
error.normalized_codestring
Lowercase alias such as "unauthorized".
error.messagestring
Human-readable error message.
request_idstring
Request identifier for debugging and support.