/groups/{groupId}/mediaStart an upload: reserve it and get a URL to PUT the file to
Single-part uploads up to 50 MiB. PUT the bytes to upload_url with exactly headers, then call verify.
Path
groupIduuidrequiredA social group id from
GET /groups.
Headers
Idempotency-KeystringUp to 128 visible ASCII characters. Retrying with the same key and body within 24 hours replays the first answer (with
Idempotent-Replayed: true) instead of doing the work twice; the same key with a different body is 422idempotency_conflict.up to 128 characters
Body
filenamestringrequired1 to 255 characters, matches ^[^\u0000-\u001f\u007f]+$
content_typestringrequiredThe MIME type the file will be uploaded with, e.g. image/png.
1 to 200 characters
bytesintegerrequiredThe exact file size. Single-part uploads only (up to 50 MiB).
1 to 9007199254740991
Returns
201 with a MediaUpload object; an error answers in the Error envelope.
curl -X POST https://postacio.com/api/v1/groups/$GROUP_ID/media \
-H "Authorization: Bearer $POSTACIO_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"filename": "chart.png",
"content_type": "image/png",
"bytes": 284211
}'