Cunnekt Whatsapp API allows you to automate notifications, replies, and other integrations with your platform. To get started, you need to have an active plan with API feature.
The default base URL for Cunnekt Messaging API is: https://app2.cunnekt.com/v1
Endpoints of this API need to be accessed by providing API-KEY in the header. You can generate API Key from Cunnekt API Settings page.
A message template is required for the Business to start a new conversation with a User. This is required if there was no interaction between the accounts previously or if the last message sent by the User has more than 24h.
POST: https://app2.cunnekt.com/v1/sendnotification
Parameters:
Body
mobile |
string |
Whatsapp Number |
templateid |
string |
Template ID |
Cunnekt makes it easier for developers to send template messages via Dynamic Payload available on Template List page for every new template that gets approved. You will see the API Payload option with </> icon, clicking on which gives you a sample payload for that particular template.
{
“mobile”: “wa_id”,
“templateid”: “template_id”
}
Note: Template ID value is available in Payload Details on Template List Page
Sample
{
“mobile”: “919000000000”,
“templateid”: “asdasdfvFFsd42”
}
Parameters can be header image/video/document and variables in your body or button.
{
“mobile”: “wa_id”,
“templateid”: “template_id”,
“template”: {
“components”: [{
“type”: “header”,
“parameters”: [{
“type”: “image”,
“image”: {
“link”: “https://link-to-your-image.jpg”
}
}
]
}, {
“type”: “body”,
“parameters”: [{
“type”: “text”,
“text”: “Vivek”
}, {
“type”: “text”,
“text”: “1245 KM”
}
]
}
]
}
}
For Header type “document” or “video”, change the header parameter “type”: “document” / “video”
Example:
{
“type”: “header”,
“parameters”: [{
“type”: “document”,
“document”: {
“link”: “https://link-to-your-document.pdf”
}
}
]}
The phone number must be in the format: 919898989898
Where, 91 is the country code, followed by the 10-digit (depending on the country) phone number
Message sent information is returned to the API request automatically. To receive responses for delivered, read, or any other responses received from Whatsapp, you are required to set up the Callback URL in API Settings.
Webhook/Callback URL is set to receive customer replies, delivery/read receipt, and more information related to messaging. To setup your callback URL, go to Cunnekt API Settings
Callbacks you will receive:
This API endpoint can only be used to send a reply message after a customer has responded within 24 hour customer service window.
If your customer has not responded to you or you want to initiate a conversation with your customer, you should use Template Send API endpoint.
POST: https://app2.cunnekt.com/v1/sendreplymessage
Parameters:
Body
recipient_type |
string |
individual |
to |
string |
Recipient wa_id |
type |
string |
text, audio, document, image, video |
text |
string |
Contains body field |
language |
string |
Template language |
policy |
string |
Delivery Policy |
code |
string |
Language code |
name |
string |
Template name |
# For Text
{
“mobile”: “{91mobile}”,
“type”: “text”,
“text”: “hello”
}
# For image
{
“mobile”: “{91mobile}”,
“type”: “image”,
“image”: “{link}”
“caption”: “{caption}”,
}
# For audio
{
“mobile”: “{91mobile}”,
“type”: “audio”,
“audio”: “{link}”,
“caption”: “{caption}”,
}
# For document
{
“mobile”: “{91mobile}”,
“type”: “document”,
“document”: “{link}”,
“caption”: “{caption}”,
}
# For video
{
“mobile”: “{91mobile}”,
“type”: “video”,
“video”: “{link}”,
“caption”: “{caption}”,
}
# For Interactive Buttons
{
“mobile”: “{91mobileNumber}”,
“type”: “button”,
“header”: {
“type”: “text”,
“text”: “Hello User”
},
“body”: “hello test body message”,
“buttons”: [
{
“type”: “reply”,
“reply”: {
“id”: “1”,
“title”: “Book Demo”
}
},
{
“type”: “reply”,
“reply”: {
“id”: “2”,
“title”: “Learn More”
}
},
{
“type”: “reply”,
“reply”: {
“id”: “3”,
“title”: “Request Callback”
}
}
]
}
# For Interactive List
{
“mobile”: “{91mobileNumber}”,
“type”: “list”,
“header”: {
“type”: “text”,
“text”: “Hello User”
},
“body”: “hello test body message”,
“list_title”: “Chooes Your Option”,
“list”: [
{
“id”: “1”,
“title”: “Accounts”,
“description”: “Issuesrelatedtowithdrawalanddeposits”
},
{
“id”: “2”,
“title”: “Tournament”,
“description”: “Issuesrelatedtotournamentgameplay”
},
{
“id”: “3”,
“title”: “Game”,
“description”: “Issuesrelatedtotournamentgameplay”
},
{
“id”: “4”,
“title”: “Wallet”,
“description”: “Issuesrelatedtotournamentgameplay”
},
{
“id”: “5”,
“title”: “Makeup”,
“description”: “Issuesrelatedtotournamentgameplay”
},
{
“id”: “6”,
“title”: “Dance”,
“description”: “Issuesrelatedtotournamentgameplay”
}
]
}
Message encoding:
Formatting |
Symbol |
Example |
Bold |
Asterisk (*) |
Your total is *$10.50*. |
Italics |
Underscore (_) |
Welcome to _WhatsApp_! |
Strike-through |
Tilde (~) |
This is ~better~ best! |
Code |
Three backticks (“`) |
“`print ‘Hello World’;“` |
Enter your number to request a callback. Our team will get in touch with you within five minutes.