Skip to main content
POST
Upload media

Authorizations

Authorization
string
header
required

Personal access token, sent as Authorization: Bearer <token>.

Path Parameters

workspace
string
required

The workspace UUID

Body

Either a JSON body with url, or a multipart/form-data body with files[].

The JSON shape of POST /workspaces/{workspace}/media_contents: a file given by URL. The multipart shape (files in the request) is StoreMediaContentFilesRequestStub; the generated spec shows both.

url
string<uri>
required

Public http(s) URL of the image or video. Redirects are followed (3 at most) and every hop must point at a public address. The file type is read from the bytes, not from the URL or the Content-Type.

Maximum string length: 2048
name
string | null

Name to store the file under (3 to 100 characters, no extension needed: it comes from the file). Defaults to the URL's file name.

Required string length: 3 - 100
label
string | null

Label shown in the library

Maximum string length: 250
folder_id
string<uuid> | null

Folder UUID from GET /workspaces/{workspace}/media_library/folders; omit for the root of the library

Response

Stored: every item in data is active.

data
MediaContentResource · object[]
required
message
string
required