Skip to main content

Whatsapp Messages API (pass-through)

The following API allows you to invoke the whatsapp messages api directly. The complete documentation for this api can be found here

Please note that chakra provides only a thin wrapper on top of the original whatsapp API.

Note: All the apis accept api key based token authentication and return data within the wrapper { _data:{}, _meta: {}, _errors:[] }

Path

POST /v1/ext/plugin/whatsapp/<pluginId>/api/<whatstappApiVersion>/<whatsappPhoneNumberId>/messages

Following are the valid examples of this path

/v1/ext/plugin/whatsapp/d83e1d23-50b8-4d87-8f92-842a0ac516f6/api/v17.0/775966265503012/messages

Path parameters

ParamDescription
pluginIdThe whatsapp plugin id where you have connected your whatsapp account. Its an UUID. You can copy it from the plugin details page url /admin/plugin/d83e1d23-50b8-4d87-8f92-842a0ac516f6 The last part of the url is the plugin id
whatstappApiVersionThe whatsapp api version you want to use like v17.0, v19.0 ...
whatsappPhoneNumberIdProvide the whatsapp phone number id for the phone number you are going to use to send this message. Connected phone numbers and their Ids can be found in the plugin page

Body

The body is a json object. The exact format can be found in the whatsapp api documentation here

Sample Body

{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "919901258433",
"type": "template",
"template": {
"name": "hello_world",
"language": {
"policy": "deterministic",
"code": "en_US"
},
"components": [
{
"type": "body",
"parameters": [
]
}
]
}
}

Response

On successful invocation of the api the api returns the whatsapp message id

Sample Response

{
"_data": {
"whatsappMessageId": "wamid.HBgMOTE5OTAxMjU4NDMzFQIAERgSREM5NDZGMjRFNzc1QUFDOEExAA=="
}
}