ChakraHQChakraHQ
APIs & Webhooks

Send Session Message via API

Guide on how to send session messages via APIs

You can use the send template message to a phone number using the following API. Details of this API can be found in its API documentation page

Url

Use POST http method with the following url

https://api.chakrahq.com/v1/ext/plugin/whatsapp/{pluginId}/api/{whatstappApiVersion}/{whatsappPhoneNumberId}/messages

Need to provide 3 url patameters

Headers

Need to provide an authorization header

  • Authorization: Bearer \[accessToken]

Learn how to generate an access token

Request Body

Following is an example of the request body to send a sample template message

Request body keys:

  • messaging_product - should be "whatsapp"
  • to - the phone number to which you need to send the message to
  • type - type of message like text, image, interactive, etc...
{  "messaging_product": "whatsapp",  "to": "912233223322",  "type": "text",  "text": {      "body": "This is a text message"  }}

More details about the api and example can be found in this API Documentation