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
  }'
FieldRequiredDescription
filenameYesOriginal filename
contentTypeYesMIME type (see supported types below)
fileSizeYesFile size in bytes

Supported content types

TypeMIMEMax size
JPEGimage/jpeg50 MB
PNGimage/png50 MB
GIFimage/gif50 MB
WebPimage/webp50 MB
MP4video/mp4512 MB
QuickTimevideo/quicktime512 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.png

Step 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
  }'
FieldRequiredDescription
widthNoImage/video width in pixels
heightNoImage/video height in pixels
thumbnailBase64NoBase64-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

ParameterDefaultOptions
typeallimage, video, gif
searchSearch by filename
sortBycreatedAtcreatedAt, filename, fileSize
orderdescasc, desc
limit501-100
cursorCursor 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"
  }
}