{
"status": "success",
"message": "message sent successfully",
"messageId": "gBEGkXdgloBAAgluX2iGtsi"
}
{
"status": "failed",
"error": {
"meta": {
"api_status": "stable",
"version": "2.27.12"
},
"errors": [
{
"code": 2000,
"title": "Number of parameters does not match the expected number of params",
"details": "number of localizable_params (1) does not match the expected number of params (2)",
"href": "https://developers.facebook.com/docs/whatsapp/faq#faq_1612022582274564"
}
]
}
}
Mobile number to which WhatsApp notification has to be sent, prefixed with country code without + sign for e.g. "919876543210".
templateName
string
Name of the template pre-approved by WhatsApp.
parameter
string
An array of parameters that will replace the placeholder’s in the approved template. The number of parameters in a message template and the length of the array must be equal. Send an empty array if the template doesn't have any parameters e.g. []
file
string
This is an object type. Use only if the template has an attachment.
file.type
string
document / video / image
file.url
string
Public URL of the attachment
file.name
string
Optional caption for the attachment
buttons
string
Applicable only if the template has buttons. Send an empty array for Call to Action buttons, e.g. [].
buttons.type
string
Only if the button in the template is of type URL then type = “url”
buttons.url
string
URL suffix to the pre-approved URL with the template. WhatsApp does not allow completely dynamic URL. A part of URL is pre-approved with the template, and only URL suffix is sent in the API.
language
String
Language Code (optional). Refer WhatsApp documentation for supported language - Supported Language