Manage

Media API

Upload an image, video, or audio file. It is stored on your CDN and served at /{org}/media/{id}. Requires a media-family key.

POST/api/v1/upload

Request

Send multipart/form-data with a single file field. Max 100 MB.

bash
curl -X POST http://localhost:3000/api/v1/upload \
  -H "Authorization: Bearer mng_your_media_key" \
  -F "[email protected]"

Response

200 OK with the file record. The public URL is http://localhost:3000/{org}/media/{id}.

json
{
  "id": "9f1c2e7a-…",
  "url": "http://localhost:3000/your-org/media/9f1c2e7a-…",
  "name": "clip.mp4",
  "contentType": "video/mp4",
  "category": "video",
  "size": 1048576
}

Errors

StatusMeaning
401Missing or invalid API key
402Storage limit reached for your plan; upgrade or free up space
403Key type can't upload this category
413File is larger than 100 MB
415Unsupported file type (only image, video, audio)
400No file provided