Skip to main content
POST
/
media
/
upload
Upload an image
curl --request POST \
  --url https://api.open.cx/media/upload \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'file=<string>' \
  --form 0.file='@example-file'
{
  "id": "<string>",
  "url": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data
file
file
required

The file to upload. 5MB max.

Response

Default Response

id
string
required

Unique identifier for the stored file.

url
string
required

Public URL for the uploaded image.