v3

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-012582298.4 KB
Media

Create media upload

Generate a presigned S3 upload URL for images, videos, GIFs, or PDFs. After you receive the URL, upload the file contents with a PUT request and then reference the returned media_id when creating drafts.

Uploading: Send a plain PUT with only raw file bytes as the body — no extra headers (Content-Type, Authorization, etc.). The presigned URL signature was calculated without them, so adding headers causes a 403 SignatureDoesNotMatch. Use curl -T <file> (not --data-binary), requests.put(url, data=file_bytes) in Python, or fetch(url, {method:'PUT', body:buffer}) in JS. A successful upload returns 200 or 204.

Required permission: WRITE access to the social set.

post/v2/social-sets/{social_set_id}/media/upload

Path parameters

social_set_idinteger required

Request body

file_namestring required

Original filename with extension (e.g., 'image.jpg', 'video.mp4'). Used for MIME type detection and display. Allowed characters: letters, numbers, hyphens, underscores, periods, parentheses. Allowed extensions: .jpg, .jpeg, .png, .webp, .gif, .mp4, .mov, .pdf

Example request

{
  "file_name": "profile-photo.jpg"
}

Response

Upload URL created successfully

media_idstring uuid required

Unique identifier for the uploaded media. Use this ID when attaching media to posts.

upload_urlstring required

Presigned S3 URL for uploading the file. PUT the file content to this URL within 1 hour.

Example response

{
  "media_id": "550e8400-e29b-41d4-a716-446655440000",
  "upload_url": "https://s3.amazonaws.com/bucket/path/file?signature=..."
}