v2

latestOpenAPI 3.1.02026-08-075421692.0 MB
Media

Get upload URL

Get a presigned URL to upload files directly to cloud storage (up to 5GB). Returns an uploadUrl and publicUrl. PUT your file to the uploadUrl, then use the publicUrl in your posts.

post/v1/media/presign

Request body

filenamestring required

Name of the file to upload

contentType'image/jpeg' | 'image/jpg' | 'image/png' | 'image/webp' | 'image/gif' | 'video/mp4' | 'video/mpeg' | 'video/quicktime' | 'video/avi' | 'video/x-msvideo' | 'video/webm' | 'video/x-m4v' | 'application/pdf' | 'audio/mpeg' | 'audio/mp4' | 'audio/aac' | 'audio/ogg' | 'audio/wav' | 'audio/webm' | 'audio/x-m4a' required

MIME type of the file

sizeinteger

Optional file size in bytes for pre-validation (max 5GB)

Example request

{
  "filename": "my-video.mp4",
  "contentType": "video/mp4",
  "size": 15234567
}

Response

Presigned URL generated successfully

uploadUrlstring uri

Presigned URL to PUT your file to (expires in 1 hour)

publicUrlstring uri

Public URL where the file will be accessible after upload

keystring

Storage key/path of the file

expiresIninteger

Seconds until the presigned uploadUrl expires (always 3600)