REST API
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://api.adaptlypost.com/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 |