API ReferenceMessages
Send a media message
POST
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.
header
AuthorizationBearer <token>Your organization API key: Authorization: Bearer org_…
application/json- body
channelId*ChannelIdYour channel's ID: copy it from the channel's card on the dashboard's Channels page.
to*PhoneNumberRecipient's number in international format, digits only, no +.
media*Sent, or success: false for a non-WhatsApp channel.
application/json- response
success*booleanmessageId?stringThe 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"}