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.
| Method | Path | Description |
|---|---|---|
| GET | /media | The 200 most recent uploads |
| POST | /media | multipart file, or JSON {url | base64, fileName?, mimeType?}; returns publicUrl |
| GET | /media/{id} | One upload |
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}/mediawith{"mediaId":"…"}(a Postgale upload) returns the WhatsApp media id (WhatsApp media).