Upload a media file
POST/cms/media
POST
/cms/media
Uploads a new media file into the library. Optionally associate it with a content item by providing a content_id.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
file
required
The file to upload
string format: binary
content_id
Optional ID of a content item to associate the media with
integer
title
Optional title for the media
string
alternate_text
Optional alternate text for the media
string
Responses
Section titled “Responses”Upload successful
object
id
ID of the created attachment
integer
Bad request (missing file or invalid content_id)
Unauthorized
Forbidden