Skip to content

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

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.

Request body

Content-Type: application/json

  • filename (string) required — Name of the file to upload
  • contentType (string) required — MIME type of the file
  • size (integer) — Optional file size in bytes for pre-validation (max 5GB)

Responses

200 — Presigned URL generated successfully

  • uploadUrl (string) — Presigned URL to PUT your file to (expires in 1 hour)
  • publicUrl (string) — Public URL where the file will be accessible after upload
  • key (string) — Storage key/path of the file
  • type (string) (enum: image, video, document) — Detected file type based on content type

400 — Invalid request (missing filename, contentType, or unsupported content type)

  • error (string)

401