Media
Uploading images and videos to attach to posts
Media uploads use a three-step process: initiate an upload to get a presigned URL, upload the file directly to cloud storage, then complete the upload to register the media in EziBreezy.
Upload flow
1. POST /v1/media/upload → Get presigned URL
2. PUT <presigned URL> → Upload file bytes directly
3. POST /v1/media/upload/:id/complete → Finalize and get media ID
Step 1: Initiate upload
curl -X POST https://api.ezibreezy.com/v1/media/upload \
-H "Authorization: Bearer ezb_live_..." \
-H "x-workspace-id: ws-uuid" \
-H "Content-Type: application/json" \
-d '{
"filename": "photo.png",
"contentType": "image/png",
"fileSize": 102400
}'| Field | Required | Description |
|---|---|---|
filename | Yes | Original filename |
contentType | Yes | MIME type (see supported types below) |
fileSize | Yes | File size in bytes |
Supported content types
| Type | MIME | Max size |
|---|---|---|
| JPEG | image/jpeg | 50 MB |
| PNG | image/png | 50 MB |
| GIF | image/gif | 50 MB |
| WebP | image/webp | 50 MB |
| MP4 | video/mp4 | 512 MB |
| QuickTime | video/quicktime | 512 MB |
Response:
{
"data": {
"sessionId": "session-uuid",
"uploadUrl": "https://storage.example.com/presigned-url...",
"expiresIn": 3600
},
"meta": null
}Step 2: Upload the file
Upload your file bytes directly to the presigned URL. This goes straight to cloud storage — not through the EziBreezy API:
curl -X PUT "PRESIGNED_URL" \
-H "Content-Type: image/png" \
--data-binary @photo.pngStep 3: Complete the upload
curl -X POST https://api.ezibreezy.com/v1/media/upload/SESSION_UUID/complete \
-H "Authorization: Bearer ezb_live_..." \
-H "x-workspace-id: ws-uuid" \
-H "Content-Type: application/json" \
-d '{
"width": 800,
"height": 600
}'| Field | Required | Description |
|---|---|---|
width | No | Image/video width in pixels |
height | No | Image/video height in pixels |
thumbnailBase64 | No | Base64-encoded thumbnail image |
Response:
{
"data": {
"id": "media-uuid",
"url": "https://media.ezibreezy.com/...",
"thumbnailUrl": "https://media.ezibreezy.com/.../thumb.jpg",
"width": 800,
"height": 600
},
"meta": null
}Attaching media to posts
Use the id from the upload response in your post's mediaIds array:
{
"integrationId": "...",
"content": "Check out this photo!",
"mediaIds": ["media-uuid"],
"scheduledAt": "2027-01-01T12:00:00Z"
}You can attach up to 10 media items per post.
Listing media
Browse your media library with cursor-based pagination:
curl "https://api.ezibreezy.com/v1/media?type=image&sortBy=createdAt&order=desc&limit=20" \
-H "Authorization: Bearer ezb_live_..." \
-H "x-workspace-id: ws-uuid"Query parameters
| Parameter | Default | Options |
|---|---|---|
type | all | image, video, gif |
search | — | Search by filename |
sortBy | createdAt | createdAt, filename, fileSize |
order | desc | asc, desc |
limit | 50 | 1-100 |
cursor | — | Cursor from previous response's nextCursor |
Response:
{
"data": [
{
"id": "media-uuid",
"url": "https://media.ezibreezy.com/...",
"thumbnailUrl": "https://media.ezibreezy.com/.../thumb.jpg",
"type": "image/png",
"filename": "photo.png",
"fileSize": 102400,
"width": 800,
"height": 600,
"createdAt": "2026-01-01T00:00:00.000Z"
}
],
"meta": {
"limit": 20,
"hasMore": true,
"nextCursor": "cursor-string"
}
}