Skip to content

Upload a media file

POST
/cms/media

Uploads a new media file into the library. Optionally associate it with a content item by providing a content_id.

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

Upload successful

object
id

ID of the created attachment

integer

Bad request (missing file or invalid content_id)

Unauthorized

Forbidden