POST /whatsapp/accounts/{id}/media

Upload a Postgale media (mediaId) or a public https URL (≤100 MB) to WhatsApp; send the returned id as whatsappMediaId (Meta keeps it 30 days)

POST
/whatsapp/accounts/{id}/media

Authorization

BearerAuth
headerAuthorizationBearer <token>

API key sk_...

Path Parameters

id*string

WhatsApp account id

Request Body

application/json
  1. body

Exactly one of mediaId or url

mediaId?string

Postgale media id

url?string

Public https URL

mimeType?string

url: overrides the response Content-Type

fileName?string

Response Body

{accountId, media}

application/json
  1. response
accountId?string
media?
Example Request
curl -X POST 'https://example.com/api/v1/whatsapp/accounts/string/media' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "accountId": "string",  "media": {    "id": "string",    "mimeType": "string",    "size": 0,    "fileName": "string"  }}