Upload media
Reserve an upload, transfer the bytes, and confirm the media.
TikTok, Instagram, YouTube, and Facebook publishing use confirmed mediaId values from the same workspace. A Facebook text-only FEED does not need media.
Use an existing file
curl --request GET "https://www.posteady.com/api/v1/media?mediaType=IMAGE&limit=20&offset=0" \
--header "Authorization: Bearer $POSTEADY_API_KEY"Select an ID from the media array. Use total and hasMore to decide whether to increase offset. For videos use mediaType=VIDEO, which is also the default. limit is 1–100 (default 20); offset is 0–10,000.
Upload a new file
1. Reserve the upload
This example assumes image.jpg is exactly 1,048,576 bytes. Replace fileSize with the actual byte count.
curl --request POST "https://www.posteady.com/api/v1/media/uploads" \
--header "Authorization: Bearer $POSTEADY_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"mediaType": "IMAGE",
"fileName": "image.jpg",
"contentType": "image/jpeg",
"fileSize": 1048576
}'Keep the returned mediaId, fileKey, uploadUrl, expiresInSeconds, and requiredHeaders. A reservation alone is not ready for publishing.
2. Transfer the bytes
Replace uploadUrl with the returned URL and PUT within 300 seconds. These headers match the example file; use every exact value from the returned requiredHeaders. Do not send your Posteady Bearer key to the storage URL.
curl --request PUT "<uploadUrl>" \
--header "Content-Type: image/jpeg" \
--header "Content-Length: 1048576" \
--upload-file image.jpg3. Confirm the upload
After the PUT succeeds, confirm with the returned fileKey within 24 hours of creating the upload, using the same user and workspace that reserved it.
curl --request POST "https://www.posteady.com/api/v1/media/uploads/confirm" \
--header "Authorization: Bearer $POSTEADY_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"fileKey": "<fileKey>"
}'Use the confirmation response’s mediaId in your publish request. The file enters the library only after its format and reserved size are verified. Video duration, width, and height inputs are optional hints; Posteady measures supported MP4 and QuickTime files on the server.
Formats and limits
| File | mediaType | contentType | Maximum size |
|---|---|---|---|
| JPEG | IMAGE | image/jpeg | 8 MiB |
| MP4 | VIDEO | video/mp4 | 2 GiB |
| QuickTime | VIDEO | video/quicktime | 2 GiB |
File names must be at most 255 characters without directory paths or control characters; use .jpg/.jpeg/.jfif for JPEG and .mp4/.mov for video. Reserved bytes count toward the organization’s storage quota. Files remain private until confirmation; expired unconfirmed uploads are cleaned up. Unconfirmed IDs cannot be published. The shared library upload limit differs from each platform’s publishing limit.
Check platform formats · Upload reference · Confirmation reference