Images and videos
Upload a file, then attach it to a post.
Adding media is two steps: upload the file, then use its id in a post.
Upload the file
Send the file as multipart/form-data, in a field called file:
curl -X POST "$BULKIT_URL/media" \
-H "x-api-key: $BULKIT_API_KEY" \
-F "file=@./launch-banner.png"{
"id": "clx3k2p9q0001abcd1234efgh",
"fileName": "launch-banner.png",
"mimeType": "image/png",
"size": 184320,
"altText": null,
"url": "https://…",
"createdAt": "2026-08-04T09:30:00.000Z"
}Save the id. You can use it right away.
Attach it to a post
Put the id in mediaIds on a block:
{
"intent": "now",
"channels": [
{
"channelId": "CHANNEL_ID",
"blocks": [
{
"content": "Our new logo!",
"mediaIds": ["MEDIA_ID"],
"mediaAltText": { "MEDIA_ID": "A green heart logo on a white background" }
}
]
}
]
}mediaAltText is optional. It describes the image for people who cannot see
it. It is keyed by the media id.
Allowed files
| Type | Formats | Max size |
|---|---|---|
| Images | JPEG, PNG, WebP, GIF | 10 MB |
| Videos | MP4, MOV | 100 MB (bigger: see Large videos) |
| Documents | 100 MB | |
| Subtitles | VTT, SRT | 5 MB |
Each platform accepts only some of these. Check limits.acceptedMimeTypes,
limits.maxMedia and limits.requiresMedia on GET /platforms. If
requiresMedia is true, a post on that platform must have at least one file.
Large videos
For a video over 100 MB, upload it in parts instead. The biggest video you can upload depends on your plan. If one part fails, you only send that part again, not the whole file.
Start the upload
Send the file's name, type and exact size in bytes:
curl -X POST "$BULKIT_URL/media/uploads" \
-H "x-api-key: $BULKIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "fileName": "launch.mp4", "mimeType": "video/mp4", "size": 524288000 }'{ "id": "UPLOAD_ID", "partSize": 16777216, "partCount": 32 }Cut the file into partCount parts. Every part is partSize bytes, except
the last one, which is whatever is left.
Get a link for each part
Ask for up to 100 parts at a time. Part numbers start at 1:
curl -X POST "$BULKIT_URL/media/uploads/UPLOAD_ID/parts" \
-H "x-api-key: $BULKIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "partNumbers": [1, 2, 3] }'[
{ "partNumber": 1, "url": "https://…" },
{ "partNumber": 2, "url": "https://…" },
{ "partNumber": 3, "url": "https://…" }
]Each link works for one hour, so ask for links as you go on a big file.
Upload each part
Send the part's bytes with PUT to its link. Do not add your API key.
Parts can go in any order, and at the same time.
curl -X PUT "PART_URL" --data-binary @part-1.binFinish the upload
curl -X POST "$BULKIT_URL/media/uploads/UPLOAD_ID/complete" \
-H "x-api-key: $BULKIT_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"The response is the file, the same as POST /media returns. Use its id in
a post.
If this call times out, retry it with the same Idempotency-Key and you
get the file back. Without a key, a finished upload is gone, and finishing it
again returns 404.
- If a part is missing or the wrong size, you get a
400and the upload stays open. Send that part again, then finish again. - Only MP4 and MOV videos can be uploaded this way.
- To give up, call
DELETE /media/uploads/{id}. An upload left unfinished is cleaned up after one day. An upload that is already finished or cancelled returns404. - Your plan's video limit and storage are checked when you start, so a file
that is too big is refused before you upload anything (
402). Need more? Upgrade your plan.
Good to know
- Use the
id, not theurl. Theurlis temporary and changes on every response. Do not save it. - Files count towards your storage. Deleting a file with
DELETE /media/{id}frees the space right away. - Deleting a file does not remove it from posts that are already live. But a scheduled post that uses it will fail.
GET /medialists your library, newest first, a page at a time. Sendlimit(up to 100, default 25) and the previous page'snextCursorascursor, and stop whennextCursorisnull, just like listing posts. You can also see and upload files in Media.
GET /media used to return every file
It used to return a plain list of every file. It now returns one page,
{ data, nextCursor }. If your code reads the list directly, read data
and follow nextCursor, or you'll only see the newest 25 files.