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/uploadRequest
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
| Status | Meaning |
|---|---|
| 401 | Missing or invalid API key |
| 402 | Storage limit reached for your plan; upgrade or free up space |
| 403 | Key type can't upload this category |
| 413 | File is larger than 100 MB |
| 415 | Unsupported file type (only image, video, audio) |
| 400 | No file provided |