External APIIndex

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

HeaderDescription
x-api-key(Required) Your API Key for authentication
AuthorizationPass Bearer Token
Content-Typeapplication/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

FieldTypeDescription
message_uidstringUnique identifier for tracking the message
contact_numberstringRecipient’s WhatsApp number (with country code)
message.template_namestringTemplate name created and approved in WhatsApp Business Manager
message.body.variablesobjectKey-value pairs for template variables (1 = first variable, etc.)
message.buttonsarray(Optional) Interactive buttons like URL or Call buttons

Button Object Format

FieldTypeDescription
typestringCurrently supports url
textstringThe 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

FieldTypeDescription
codeintegerHTTP response code
successbooleanStatus of the request
data.message_uidstringEchoes the submitted message UID
messagestringAPI 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]