Upload Media
File and URL upload endpoints
Endpoints
| Endpoint | Method | Description |
|---|---|---|
| /v1/upload-media | POST | Upload file (multipart) or provide URL |
| /v1/upload-media/presign | POST | Get presigned URL for direct CDN upload |
| /v1/upload-media/confirm | POST | Confirm presigned upload completed |
File Upload (Multipart)
curl -X POST https://api.codivupload.com/v1/upload-media \
-H "Authorization: Bearer YOUR_KEY" \
-F "file=@video.mp4" \
-F "profile_name=my_brand"URL Upload
curl -X POST https://api.codivupload.com/v1/upload-media \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/video.mp4",
"profile_name": "my_brand"
}'Presigned URL (Large Files)
For files over 100MB, use presigned URL to upload directly to CDN:
# Step 1: Get presigned URL
curl -X POST https://api.codivupload.com/v1/upload-media/presign \
-H "Authorization: Bearer YOUR_KEY" \
-d '{"profile_name": "my_brand", "file_name": "video.mp4", "file_type": "video/mp4"}'
# Response: { "presigned_url": "https://...", "public_url": "https://cdn.codivupload.com/..." }
# Step 2: Upload directly to CDN
curl -X PUT "PRESIGNED_URL" \
-H "Content-Type: video/mp4" \
--upload-file video.mp4
# Step 3: Confirm upload
curl -X POST https://api.codivupload.com/v1/upload-media/confirm \
-H "Authorization: Bearer YOUR_KEY" \
-d '{"upload_id": "xxx"}'Supported Formats
| Type | Formats |
|---|---|
| Video | MP4, MOV, AVI, WMV, FLV, WebM, 3GP, MKV |
| Image | JPG, JPEG, PNG, GIF, WebP, BMP |
| Document |
Google Drive and Dropbox sharing URLs are automatically converted to direct download links.