External WhatsApp Messaging API - Documentation
Overview
This API allows external systems to send WhatsApp Template Messages through WappCloud’s platform using predefined templates, variables, and interactive buttons.
Endpoint
POST https://client-api.wappcloud.com/api/v1/external/process
Headers
Header | Description |
---|---|
x-api-key | (Required) Your API Key for authentication |
Authorization | Pass Bearer Token |
Content-Type | application/json |
Request Payload (JSON)
{
"message_uid": "DSFDS223432432",
"contact_number": "+919xxxxxxxxxx",
"message": {
"template_name": "template_name",
"body": {
"variables": {
"1": "XXXX",
"2": "yyyyy",
"3": "15 March 2025",
"4": "+91 xxxxxx"
}
},
"buttons": [
{
"type": "url",
"text": "1223454"
}
]
}
}
Payload Field Description
Field | Type | Description |
---|---|---|
message_uid | string | Unique identifier for tracking the message |
contact_number | string | Recipient’s WhatsApp number (with country code) |
message.template_name | string | Template name created and approved in WhatsApp Business Manager |
message.body.variables | object | Key-value pairs for template variables (1 = first variable, etc.) |
message.buttons | array | (Optional) Interactive buttons like URL or Call buttons |
Button Object Format
Field | Type | Description |
---|---|---|
type | string | Currently supports url |
text | string | The display text or reference code for the URL button |
Response Format (Success)
{
"code": 200,
"success": true,
"data": {
"message_uid": "DSFDS223432432"
},
"message": "Request processed and messages sent successfully."
}
Response Field Description
Field | Type | Description |
---|---|---|
code | integer | HTTP response code |
success | boolean | Status of the request |
data.message_uid | string | Echoes the submitted message UID |
message | string | API operation result message |
Notes
- Ensure the template name used matches the exact name configured in Meta WhatsApp Business Manager.
- Variables must be passed in correct order (1, 2, 3…) as per your template.
- Button support is limited to type
url
for now. message_uid
can be used for tracking or logging message status.- The contact number should include the country code and must be a valid WhatsApp number.
Example Template Use Case: payment_reminder
Hello {{1}}, your loan payment of {{2}} is due on {{3}}. For any assistance, please call {{4}}.
Rendered Message:
Hello **Mathi**, your loan payment of **₹10,000** is due on **15 March 2025**. For any assistance, please call **+91 9444444444**.
Support
If you face any issues or need integration help, contact our support team at: [email protected]