curl --request POST \
--url https://api.messaging.phonovation.com/whatsapp/1/message/template \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"messages": [
{
"from": "353861234583",
"to": "353861234584",
"messageId": "a28dd97c-1ffb-4fcf-99f1-0b557ed381da",
"content": {
"templateName": "template_name",
"templateData": {
"body": {
"type": "POSITIONAL_PARAMETERS",
"placeholders": [
"Placeholder Value 1",
"Placeholder Value 2"
]
}
},
"language": "en_GB"
},
"callbackData": "Callback data",
"notifyUrl": "https://www.example.com/whatsapp",
"urlOptions": {
"shortenUrl": true,
"trackClicks": true,
"trackingUrl": "https://example.com/click-report",
"removeProtocol": true
}
}
]
}
'{
"messages": [
{
"to": "353861234584",
"messageCount": 1,
"messageId": "a28dd97c-1ffb-4fcf-99f1-0b557ed381da",
"status": {
"groupId": 1,
"groupName": "PENDING",
"id": 7,
"name": "PENDING_ENROUTE",
"description": "Message sent to next instance"
}
}
],
"bulkId": "2034072219640523073"
}Send WhatsApp template message
Send a single or multiple template messages to one or more recipients. Template messages can be sent and delivered at anytime. Each template needs to be registered and pre-approved by WhatsApp.
The API response will not contain the final delivery status, use Delivery Reports instead.
Required scope: Enable one of: message:send, whatsapp:message:send, whatsapp:manage.
curl --request POST \
--url https://api.messaging.phonovation.com/whatsapp/1/message/template \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"messages": [
{
"from": "353861234583",
"to": "353861234584",
"messageId": "a28dd97c-1ffb-4fcf-99f1-0b557ed381da",
"content": {
"templateName": "template_name",
"templateData": {
"body": {
"type": "POSITIONAL_PARAMETERS",
"placeholders": [
"Placeholder Value 1",
"Placeholder Value 2"
]
}
},
"language": "en_GB"
},
"callbackData": "Callback data",
"notifyUrl": "https://www.example.com/whatsapp",
"urlOptions": {
"shortenUrl": true,
"trackClicks": true,
"trackingUrl": "https://example.com/click-report",
"removeProtocol": true
}
}
]
}
'{
"messages": [
{
"to": "353861234584",
"messageCount": 1,
"messageId": "a28dd97c-1ffb-4fcf-99f1-0b557ed381da",
"status": {
"groupId": 1,
"groupName": "PENDING",
"id": 7,
"name": "PENDING_ENROUTE",
"description": "Message sent to next instance"
}
}
],
"bulkId": "2034072219640523073"
}Authorizations
This is the most secure authorization type and the one with the most flexibility.
API keys can be generated by calling the dedicated API method. Furthermore, API keys can have a limited scope and cover only some API methods. Lastly, they can be revoked at any time. This range of possibilities makes API keys well suited for separating the API access rights across multiple applications or use cases. Finally, the loss of an API key is easily manageable.
You can manage your API keys from GUI, or programmatically with dedicated API.
API key Authorization header example:
Authorization: App 003026bbc133714df1834b8638bb496e-8f4b3d9a-e931-478d-a994-28a725159ab9
Body
Response
Message accepted for delivery