External APISend Template Message

WhatsApp Template Messages API

Overview

This API allows external systems to send WhatsApp Template Messages through WappCloud’s platform.


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

Making API Requests in Postman

Setting Up the Request Body

  1. In Postman, select the Body tab
  2. Choose raw
  3. From the dropdown, select JSON
  4. Paste your JSON payload in the text area

Template Request Payloads

1. Static Template

{
  "contact_number": "+919876541230",
  "message": {
    "template_name": "hello_world"
  }
}

2. Dynamic Text Header and Body

{
  "contact_number": "+919876541230",
  "message": {
    "template_name": "sample_v9",
    "header": {
      "type": "text",
      "text": "sample"
    },
    "body": {
      "variables": {
        "1": "John Doe",
        "2": "Gojo"
      }
    }
  }
}

3. Dynamic Header Image

{
  "contact_number": "+919876541230",
  "message": {
    "template_name": "img1",
    "header": {
      "type": "image",
      "url": "https://example.com/image.png"
    }
  }
}

4. Dynamic Button

{
  "contact_number": "+919876541230",
  "message": {
    "template_name": "dynamic_button_v1",
    "buttons": [
      {
        "type": "url",
        "text": "1223454"
      }
    ]
  }
}

Response Format (Success)

{
  "code": 200,
  "success": true,
  "data": {
    "message_uid": "DSFDS223432432"
  },
  "message": "Request processed and messages sent successfully."
}

Notes

  • Do not change field names → They must match exactly (contact_number, message, template_name, etc.).
  • Contact number rules:
    • Must start with + and include country code.
    • No dashes or spaces allowed. Example: +919876541230.
  • message_uid is optional.
  • Template names must match exactly as configured in Meta WhatsApp Business Manager.
  • For templates, variable order must follow (1, 2, 3, …).