Skip to content

Media

Upload images and videos to Marsial before posting them.

POST/v1/media/upload-url

JPEG, PNG, WebP and GIF up to 20 MB; MP4, MOV and WebM up to 1 GB. PUT the file to uploadUrl, then post publicUrl.

Body

  • filenamestringrequired

    max 255

  • contentTypestringrequired

    min 3

  • sizeintegerrequired

    max 9,007,199,254,740,991

Response 200

data
  • uploadUrlstring (uri)required

    Pre-signed URL: PUT the file there with the same Content-Type.

  • publicUrlstring (uri)required

    Use it in a post's media once uploaded.

  • kindstringrequired

    Values: image · gif · video

  • expiresInintegerrequired

    Seconds the upload URL stays valid.

    max 9,007,199,254,740,991

Terminal window
curl -X POST "https://api.marsial.dev/v1/media/upload-url" \
-H "Authorization: Bearer $MARSIAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"filename": "autumn.mp4",
"contentType": "video/mp4",
"size": 48211234
}'

© 2026 Marsial by TWOFACES ·marsial.dev ·Dashboard ·soporte@twofacesco.com