Whatsapp official
Authorization
apiKey api-key<token>
In: query
Path Parameters
channelId*string
Unique identifier of the communication channel as registered on the Ventia platform.
contactId*string
Unique identifier of the recipient contact as registered on the Ventia platform.
Request Body
application/json
preview_url?string
Indicates whether a preview of the link will be generated in the WhatsApp message. If present and enabled, WhatsApp will attempt to fetch a preview of the link's content.
message*
Response Body
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": "text" } }'{
"success": true,
"messaging_product": "whatsapp",
"contacts": [
{
"input": "598xxxxxxxxxx",
"wa_id": "598xxxxxxxxxx"
}
],
"messages": [
{
"id": "WHATSAPP_MESSAGE_ID"
}
]
}{
"details": "Invalid message body.",
"message": "Invalid request body. Only the message content is valid. For more information, refer to the Facebook documentation on message types: https://developers.facebook.com/docs/messenger-platform/send-messages/",
"success": false
}{
"success": false,
"error": {
"message": "(#132001) Template name does not exist in the translation",
"type": "OAuthException",
"code": 132001,
"error_data": {
"messaging_product": "whatsapp",
"details": "template name (test) does not exist in en"
},
"fbtrace_id": "xxxxxxxxxxxxxxxx"
}
}{
"error": "Internal Server Error",
"details": "Internal Server Error",
"success": false
}