Get signed media upload URL
Preferred upload flow for larger image, video and PDF files. Accepted types: JPEG, PNG, GIF, WebP, MP4, MOV, WebM, and PDF up to 50MB (a PDF is for LinkedIn document posts only). HEIC and every other type are rejected. Returns a short-lived object-storage signed URL. Handles 1 to 20 files per call: send files for a batch and get slots plus a summary back, with per-file errors reported in place and the storage quota counted across the batch. A batch spends one point of the media rate limit per file (a single-file call spends one), against the media upload limit, so a request that does not fit the remaining budget answers 429 with Retry-After. Slots expire after 15 minutes. PUT the raw file bytes to upload_url with the returned headers (at least the signed Content-Type). Send pin_content_type: true to lock each URL to the declared type: the PUT must then send exactly the returned Content-Type header or storage answers 403 (curl --data-binary needs -H "Content-Type: ..."). After a successful PUT, pass public_url to create_post as media_url. The file never travels through a posterly serverless function, so plan caps (Starter 500MB video, Agency 4GB) are not limited by Vercel payload size. To publish a PDF, create the post with post_type: "document", set media_url to the PDF public_url and pass document_title (required, up to 100 characters) in settings; only LinkedIn publishes documents.
Request
- Base URL: https://www.poster.ly
- URL: https://www.poster.ly/api/v1/media/signed-upload
- Auth: HTTP bearer
Request body
Example request
{
"filename": "hero.jpg",
"content_type": "image/jpeg",
"size": 245678
}Response
Signed upload URL generated (single file), or one slot per file with a summary (batch)
Example response
{
"upload_url": "https://accountid.r2.cloudflarestorage.com/media/users/123/hero.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=900",
"token": "signed-token-abc",
"path": "users/123/hero.jpg",
"public_url": "https://assets.poster.ly/users/123/hero.jpg",
"expires_at": "2026-08-29T12:15:00.000Z",
"max_size": 245678,
"headers": {
"content-type": "image/jpeg"
},
"provider": "r2"
}Changes
No recorded changes to this operation across all 1 revision of this API.