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 to upload. Rejected with a 400 (INVALID_FIELD_VALUE on contentType) when it is not one of these values, so generic types such as application/octet-stream are not accepted here.

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)

Changes

No recorded changes to this endpoint across all 29 revisions of this API.