REST APIPOST
Media Upload
Upload images and videos using presigned URLs
Media upload is a two-step process: first request a presigned upload URL, then upload your file directly to that URL. This keeps your files secure and allows for large uploads.
POST
https://post.adaptlypost.com/post/api/v1/upload-urlsRequest presigned upload URLs for one or more files. You can request up to 20 URLs in a single call.
API Key (Bearer token)
Body Parameters
| Parameter | Type | Description |
|---|---|---|
filesREQUIRED | FileUploadRequest[] | Array of file metadata (1-20 items) |
files[].fileNameREQUIRED | string | Original file name |
files[].mimeTypeREQUIRED | string | image/jpeg, image/png, image/webp, video/mp4, or video/quicktime |
Step 1: Get Upload URLs
Send a POST request with file metadata to receive presigned upload URLs. See the code panel for an example request and response.
Step 2: Upload the File
Use the uploadUrl from the response to upload your file via a PUT request. See the code panel for an example.
Step 3: Use in a Post
Pass the publicUrl from the upload response as a mediaUrls entry when creating a post.
Upload URL expiration
Presigned URLs expire after 1 hour. Upload your file before the expiresAt timestamp or request a new URL.Supported Formats
| Type | MIME Types |
|---|---|
| Images | image/jpeg, image/png, image/webp |
| Videos | video/mp4, video/quicktime |
Get upload URLs
curl --request POST \
--url https://post.adaptlypost.com/post/api/v1/upload-urls \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"files": [
{
"fileName": "product-photo.jpg",
"mimeType": "image/jpeg"
}
]
}'Upload file
curl --request PUT \
--url "https://storage.adaptlypost.com/presigned/abc123..." \
--header 'Content-Type: image/jpeg' \
--data-binary @product-photo.jpg200
{
"urls": [
{
"fileName": "product-photo.jpg",
"uploadUrl": "https://storage.adaptlypost.com/presigned/abc123...",
"publicUrl": "https://cdn.adaptlypost.com/uploads/product-photo.jpg",
"key": "uploads/usr_001/product-photo.jpg",
"expiresAt": "2026-03-14T13:00:00Z"
}
]
}