Whatsapp business
Authorization
bearerAuth AuthorizationBearer <token>
API key sent as Authorization: Bearer <API_KEY>.
In: header
Path Parameters
channelId*string
Id of the official WhatsApp channel (WhatsApp Business) in Ventia.
contactId*string
Id of the recipient contact in Ventia. The message is sent to the contact's first phone number.
Request Body
application/json
message*
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -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"
}{
"success": false,
"error": "Invalid template parameters",
"details": "Template 'order_ready' expects 2 body parameter(s), received 1."
}Empty
Empty
{
"success": false,
"error": "Template not found on this channel"
}{
"success": false,
"error": "Message rejected by WhatsApp",
"details": "(#131047) Re-engagement message",
"interactionId": "665f1c2e8b3e4a00aaaaaaaa"
}{
"success": false,
"error": "Template is not approved (status: pending)"
}{
"success": false,
"error": "Internal server error"
}