Upload
POST /api/v1/upload
Requires write permission. Uploads a file using multipart form data.
Request
Send a multipart/form-data request with the following fields:
| Field | Required | Description |
|---|---|---|
file | Yes | The file to upload |
tags | No | Comma-separated list of tags |
description | No | Text description |
folderId | No | Destination folder ID |
Size limits
| Plan | Max file size |
|---|---|
| Free | 10 MB |
| Pro | 100 MB |
| Enterprise | Custom |
Exceeding the limit returns 413 FILE_TOO_LARGE.
Example
curl -X POST https://medianest.app/api/v1/upload \
-H "X-API-Key: mn_your_key" \
-F "file=@photo.jpg" \
-F "tags=product,hero" \
-F "description=Product hero shot"
Response
{
"success": true,
"data": {
"id": "clx1abc123",
"filename": "photo.jpg",
"fileType": "IMAGE",
"fileSize": 204800,
"cdnUrl": "https://...",
"thumbnailUrl": "https://...",
"createdAt": "2026-05-11T00:00:00.000Z"
}
}
Duplicate detection
If the uploaded file is identical (same SHA-256 checksum) to an existing file in your account, the request returns 409 DUPLICATE_FILE.