Whatsapp business
Send message
Sends a message to a contact through an official WhatsApp (WhatsApp Business) channel. The message is registered as an interaction on the contact, the same as messages sent from Ventia. Supported types: `text`, `image`, `video`, `audio`, `document` (by public URL), `location` and `template`. Outside the 24-hour customer service window only `template` messages are delivered by WhatsApp. Requires the `interactions:create` scope.
POST
bearerAuthheader
AuthorizationBearer <token>API key sent as Authorization: Bearer <API_KEY>.
channelId*stringId of the official WhatsApp channel (WhatsApp Business) in Ventia.
contactId*stringId of the recipient contact in Ventia. The message is sent to the contact's first phone number.
application/json- body
message*Message sent.
application/jsoncurl -X POST 'https://api.getventia.com/api/v1.0/whatsapp-business/string/string/messages' \ -H 'Content-Type: application/json' \ -d '{ "message": { "type": "template", "template": { "name": "order_ready", "language": { "code": "es" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Ana" }, { "type": "text", "text": "#1234" } ] } ] } }}'{ "success": true, "interactionId": "665f1c2e8b3e4a00aaaaaaaa", "wppId": "wamid.HBgLNTk4OTk...", "status": "sent"}