Enigma Developers
API ReferenceMessages

Send a media message

POST
/v1/messages/media

Sends an image, video, audio, document or sticker on a WhatsApp channel. Set media.type and fill the object with the same name, using either a public link or a WhatsApp mediaId.

Returns success: false if the channel is not a WhatsApp channel. Requires scope message:send.

Authorization

headerAuthorizationBearer <token>

Your organization API key: Authorization: Bearer org_…

Request Body

application/json
  1. body
channelId*ChannelId

Your channel's ID: copy it from the channel's card on the dashboard's Channels page.

to*PhoneNumber

Recipient's number in international format, digits only, no +.

media*

Response Body

Sent, or success: false for a non-WhatsApp channel.

application/json
  1. response
success*boolean
messageId?string

The WhatsApp message ID

curl -X POST 'https://api.enigma-ai.com/v1/messages/media' \  -H 'Content-Type: application/json' \  -d '{  "channelId": "3f6c1a2e-8b4d-4c7a-9e21-5d0b7f3a6c19",  "to": "249912345678",  "media": {    "type": "document",    "document": {      "link": "https://example.com/invoice-10234.pdf",      "filename": "invoice-10234.pdf",      "caption": "Your invoice"    }  }}'
{  "success": true,  "messageId": "string"}