Messages
Send a WhatsApp template message
POST
https://api.hello24.in/prod/v1/sendTemplateMessageSends a pre-approved WhatsApp template message to a recipient.
Template messages can be used to:
- Start a new conversation with a customer.
- Re-engage customers after the 24-hour customer service window has expired.
- Send transactional, authentication or marketing notifications using approved WhatsApp templates.
Each request references an approved template and can optionally include values for template variables.
Template Components
A template may contain one or more of the following components:
| Component | Required | Description |
|---|---|---|
| Header | No | Text, image, video or PDF document. |
| Body | Usually | Variables used in the template body. |
| CTA Buttons | No | Dynamic parameters for call-to-action buttons. |
| Quick Reply Buttons | No | Options customers can tap to send a predefined response. |
The values supplied in the request must match the template definition approved in WhatsApp Business Manager.
Recipient Number
Provide the recipient's WhatsApp number in international format without spaces or special characters.
Example:
Text
919876543210Response
An HTTP 200 OK response only confirms that Hello24 successfully received your request.
Always inspect the response body:
code = SUCCESSindicates the message was accepted for delivery.code = FAILUREindicates the message was rejected. The response contains one or more errors describing the reason.
Request
Headers
HELLO24_API_KEYstringrequired- Your Hello24 API key. See Authentication.
Content-Typestringrequiredapplication/json
Body
templateNamestringrequired- Name of the approved WhatsApp template including the language code. Example:
welcome_message (en) paramsTemplateParams- Values supplied for the variables defined in the approved WhatsApp template. Include only the components used by the template.
params.headerarray of string- Header variables or media URL.
params.bodyarray of string- Body variables in template order.
params.buttonsarray of string- Dynamic URL values for CTA buttons.
params.quick_reply_buttonsarray of string- Payload values for quick reply buttons.
phonestringrequired- Recipient phone number in international format.
Examples
Template with body variables
cURL
curl -X POST 'https://api.hello24.in/prod/v1/sendTemplateMessage' \
-H 'HELLO24_API_KEY: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"templateName": "black_friday_early_bird_access (en)",
"params": {
"body": [
"John",
"Shoes",
"20%",
"Tomorrow"
]
},
"phone": "919876543210"
}'Template with image header
cURL
curl -X POST 'https://api.hello24.in/prod/v1/sendTemplateMessage' \
-H 'HELLO24_API_KEY: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"templateName": "promotion_banner (en)",
"params": {
"header": [
"https://example.com/banner.jpg"
]
},
"phone": "919876543210"
}'Dynamic URL button
cURL
curl -X POST 'https://api.hello24.in/prod/v1/sendTemplateMessage' \
-H 'HELLO24_API_KEY: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"templateName": "order_tracking (en)",
"params": {
"body": [
"12345"
],
"buttons": [
"12345"
]
},
"phone": "919876543210"
}'Quick reply buttons
cURL
curl -X POST 'https://api.hello24.in/prod/v1/sendTemplateMessage' \
-H 'HELLO24_API_KEY: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"templateName": "order_confirmation (en)",
"params": {
"header": [
"John"
],
"body": [
"12345",
"Shoes",
"100"
],
"quick_reply_buttons": [
"View Order",
"Unsubscribe"
]
},
"phone": "919876543210"
}'Responses
200 OK
Request processed successfully.
Response fields
SendMessageSuccessResponse
codestring (SUCCESS)requireddataobjectrequireddata.contactsarray of Contactrequireddata.contacts[].inputstringrequired- Phone number provided in the request.
data.contacts[].wa_idstringrequired- WhatsApp ID of the recipient.
data.messagesarray of Messagerequireddata.messages[].idstringrequired- Unique WhatsApp message identifier.
data.metaMetarequireddata.meta.api_statusstringrequireddata.meta.versionstringrequired
When code is FAILURE
codestring (FAILURE)requirederrorstringrequired
When code is FAILURE
codestring (FAILURE)requireddatastringrequired
When code is FAILURE
codestring (FAILURE)requireddataobjectrequireddata.errorsarray of ApiErrordata.errors[].codeintegerrequireddata.errors[].titlestringrequireddata.errors[].detailsstringrequireddata.metaMetadata.meta.api_statusstringrequireddata.meta.versionstringrequired
200 OK · Successful message submission
{
"code": "SUCCESS",
"data": {
"contacts": [
{
"input": "919876543210",
"wa_id": "919876543210"
}
],
"messages": [
{
"id": "gBEGkXQRF3gGAgl4jbPFezZT6XX"
}
],
"meta": {
"api_status": "stable",
"version": "2.43.2"
}
}
}200 OK · Meta rejected the request
{
"code": "FAILURE",
"data": {
"errors": [
{
"code": 1013,
"title": "Primary Reason",
"details": "Detailed error description"
}
],
"meta": {
"api_status": "stable",
"version": "2.43.2"
}
}
}403 Forbidden
Invalid API key or unauthorized request.