Media

Upload images and videos once and use their public URL in posts and messages.

Instagram, Facebook, Threads and TikTok publish media from a public URL. Host media with POST /media and use its publicUrl as mediaUrl (or in mediaUrls) in platformSpecificData. Instagram images must be JPEG.

MethodPathDescription
GET/mediaThe 200 most recent uploads
POST/mediamultipart file, or JSON {url | base64, fileName?, mimeType?}; returns publicUrl
GET/media/{id}One upload
POST /api/v1/media
curl -X POST https://postgale.com/api/v1/media \
  -H 'Authorization: Bearer sk_…' \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://shop.example/menu.jpg","fileName":"menu.jpg"}'
  • Direct messages take an uploaded file as mediaId (Instagram and Messenger attachments, see Comments & inbox).
  • WhatsApp needs the file uploaded to WhatsApp itself: POST /whatsapp/accounts/{id}/media with {"mediaId":"…"} (a Postgale upload) returns the WhatsApp media id (WhatsApp media).