ChakraHQ APIs
HomeSign In
HomeSign In
  1. Pass Through APIs
  • API Keys
  • Response Format
  • Whatsapp
    • Inbound Events Webhook
    • How to figure out pluginId and whatsappPhoneNumberId
    • Pass Through APIs
      • WhatsApp Messages API (pass-through)
        POST
      • Send WhatsApp session message
        POST
      • Create WhatsApp Message Template (pass-through)
        POST
      • List WhatsApp Message Templates (pass-through)
        GET
      • Update WhatsApp Message Template (pass-through)
        POST
      • Fetch Whatsapp Media API
        GET
      • Show Whatsapp Media Attachments API
        GET
    • Send Whatsapp Template Message For Process
      POST
    • Send Whatsapp Template Message For A Phone Number
      POST
    • Upload Public Media
      POST
    • Show Whatsapp Media API
      GET
    • Create a lead
      POST
  • Platform
    • Process
      • Fetch Process By Id
      • List Processes
      • Create Process
      • Update Process
      • Update Process By Primary Key
      • Delete Process
      • Delete Process By Primary Key Value
      • Bulk Create Process API
      • Bulk Update Process API
    • Task
      • Create Task API
    • User
      • List Users API
      • List Users API (V2)
      • Fetch User API
      • Fetch User API (V2)
      • Update User API
    • Photo
      • Fetch Photo API
      • Upload Photo API
      • Upload Photo API With Id
    • Background Job
      • Fetch Background Job
      • Fetch Background Job Entries API
    • Fetch Config
      GET
  1. Pass Through APIs

Send WhatsApp session message

POST
https://api.chakrahq.com/v1/ext/plugin/whatsapp/{pluginId}/api/{whatstappApiVersion}/{whatsappPhoneNumberId}/messages
The following API allows you to send session messages. This API is technically same as the WhatsApp Messages API. This document is created to focus specifically on the payload formats for sending session messages.
Do note that session messages can only be sent to an end user after an active conversation window has been opened up for that user. This window only opens up after the user has sent a message to your business number. The window remains open upto 24 hours from the last message sent by the user. To send messages to users when no active conversation window is present, please send a template message.
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.

How to figure out the pluginId#

In the WhatsApp setup page, locate the 3 dots icon next to the save button, on the top right corner
Click the same and click the "Copy Plugin Id" button
The plugin id is now copied, you can paste it where you need it
copy-plugin-id

How to figure out the whatsappPhoneNumberId#

In the WhatsApp Setup page click on the Gear icon next to "📞 WhatsApp Phone Numbers"
In the drawer that opens you will find the Meta ID of each phone number in the phone number column
screenshot-of-whatsapp-phone-number-id

How to send a text session message#

You will need to provide 4 mandatory keys in the request object:
1.
messaging_product - has to be "whatsapp"
2.
to - has to be the end user's phone number with the country code and without the preceding + character
3.
type - has to be text
4.
text - has to be an object with the body key containing the string text message you want to send
Example of a payload below
{
    "messaging_product": "whatsapp",
    "to": "912233223322",
    "type": "text",
    "text": {
        "body": "This is a text message"
    }
}

How to send an image session message#

You will need to provide 4 mandatory keys in the request object:
1.
messaging_product - has to be "whatsapp"
2.
to - has to be the end user's phone number with the country code and without the preceding + character
3.
type - has to be image
4.
image - has to be an object with the link key containing a publicly accessible url for the image you want to sent
Example of a payload below
{
    "messaging_product": "whatsapp",
    "to": "912233223322",
    "type": "image",
    "image": {
        "link": "https://static-data.chakrahq.com/documentation-assets/whatsapp/api-docs/copy-plugin-id.png"
    }
}

How to send a session message of list type#

list type message contains a list of options for the user to choose from. You will need to provide 4 mandatory keys in the request object:
1.
messaging_product - has to be "whatsapp"
2.
to - has to be the end user's phone number with the country code and without the preceding + character
3.
type - has to be interactive
4.
interactive - is an object specifying the list schema. see example below
Example of a payload below
{
    "messaging_product": "whatsapp",
    "to": "912233223322",
    "type": "interactive",
    "interactive": {
        "type": "list",
        "header": {
            "type": "text",
            "text": "Quick Options"
        },
        "body": {
            "text": "Please select one of the options below"
        },
        "footer": {
            "text": "ChakraHQ"
        },
        "action": {
            "button": "Options",
            "sections": [
                {
                    "title": "All options",
                    "rows": [
                        {
                            "id": "check_order_status",
                            "title": "Check Order Status",
                            "description": "Select this option to check order status"
                        },
                        {
                            "id": "return_order",
                            "title": "Return Order",
                            "description": "Select this option to return an order"
                        }
                    ]
                }
            ]
        }
    }
}

Detailed documentation#

The request payload can be found in the Whatsapp cloud api documentation
Whatsapp cloud api documentation for session messages - WhatsApp Cloud API Guide
Whatsapp cloud api postman collection - Postman Collection

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params

Body Params application/json

Examples
{
    "messaging_product": "whatsapp",
    "to": "912233223322",
    "type": "text",
    "text": {
        "body": "This is a text message"
    }
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location --request POST 'https://api.chakrahq.com/v1/ext/plugin/whatsapp/d83e1d23-50b8-4d87-8f92-842a0ac516f6/api/v19.0//messages' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "messaging_product": "whatsapp",
    "to": "912233223322",
    "type": "text",
    "text": {
        "body": "This is a text message"
    }
}'

Responses

🟢200Success
application/json
Body

Example
{
	"_data": {
		"whatsappMessageId": "wamid.HBgMOTE5OTAxMjU4NDMzFQIAERgSREM5NDZGMjRFNzc1QUFDOEExAA=="
	}
}
Modified at 2025-10-13 08:11:37
Previous
WhatsApp Messages API (pass-through)
Next
Create WhatsApp Message Template (pass-through)
Built with