Send WhatsApp session message
A regular message consists of simply a textual message. Below is a curl example to send one to a WhatsApp number:
1
/curl --request POST \
2
--url https://api.connectly.ai/v1/businesses/<business_id>/send/messages \
3
--header 'Accept: application/json' \
4
--header 'Content-Type: application/json' \
5
--header 'X-API-Key: <YOUR_KEY_HERE>' \
6
--data '
7
{
8
"recipient": {
9
"channelType": "whatsapp",
10
"id": "+15555555555"
11
},
12
"message": {
13
"text": "hello!"
14
}
15
}'
Copied!
If the request goes through a message id will be included in the response with which you can track the message delivery status if you are subscribed to the webhook(see below for more details).
To read more on how to send a regular message, see [link].
Eligibility for sending WhatsApp messages
Notice that you can NOT send a regular message to the customer first if the customer has not messaged first. Once the customer messaged you first there is a 24-hr eligibility window for businesses to reply to the customer message. After that only template messages can be sent to the customer (see more in template messages).
Copy link