WAMANAGER

Search Documentation

Search through pages and content

WhatsApp Template Messages

WhatsApp template messages are pre-approved message formats that allow businesses to send notifications, alerts, and promotional content to users who have opted in to receive messages. Templates ensure your business can initiate conversations even outside the 24-hour customer service window.

Each message template contains structured components — such as headers, body text, footers, and interactive buttons — which can include dynamic placeholders. These placeholders (variables) are replaced with personalized content when the message is sent, enabling a more engaging and contextual user experience.

Template Categories

WhatsApp templates are divided into three main categories:

  • Marketing Templates — Used for promotional offers, announcements, and personalized recommendations to engage customers.
  • Utility Templates — Used for transactional or informational updates such as order confirmations, delivery updates, or account alerts.
  • Authentication Templates — Used for one-time passwords (OTPs) and verification codes during login or transaction validation.

Approval Process

All message templates must be approved before use. You can easily create, submit, and manage your WhatsApp message templates directly from our panel under the Your Templates section. Once submitted, our system automatically handles the approval process with WhatsApp on your behalf.

After approval, you can view and manage your templates — including their names, categories, and variable placeholders — within the same panel. These details are used when sending messages through our API.

How to Use Templates

To send a template message, follow these steps:

Step 1: Get Template Payload Information

First, retrieve the expected payload structure for your template by calling the payload info API. This endpoint returns the template structure, including all required variables, button configurations, and header components.

cURL
curl -X GET '<BASE_URL>/api/whatsapp/template/payload-info?template_name=invoice_template&template_language=en' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'

The API response includes an example_payload field that shows the exact structure you need to send when calling the template API. This example payload contains all the required fields with sample values.

Step 2: Send Template Message

Use the example_payload from the previous API response as a reference to construct your request. Replace the sample values with your actual data and send it to the template API endpoint.

cURL
curl -X POST '<BASE_URL>/api/whatsapp/template' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-d '{
  "template_name": "invoice_template",
  "template_language": "en",
  "contacts": [
    "+15550185"
  ],
  "components": {
    "broadcast_title_type": "text",
    "broadcast_title_value": "",
    "variables": [
      {
        "variable": "{{1}}",
        "type": "text",
        "value": "Italy",
        "is_user": false
      },
      {
        "variable": "{{2}}",
        "type": "currency",
        "value": "5",
        "currency_code": "KWD"
      }
    ],
    "button_variables": [
      {
        "type": "url",
        "variables": [
          {
            "variable": "{{1}}",
            "type": "text",
            "value": "italy"
          }
        ]
      }
    ],
    "header_components": [
      {
        "variable": "{{1}}",
        "type": "text",
        "value": "Mega"
      }
    ]
  }
}'

Important: Always use the example_payload from the payload info API response as your reference. It provides the exact structure required for your specific template, including whether it's a carousel template and what components are available.

Below are categorized examples of template messages, their parameter structures, and example API payloads you can use to send different types of WhatsApp template messages.

Marketing Template Message

Marketing template messages are pre-approved WhatsApp templates used for sending promotional content such as discounts, product announcements, or reminders. They help businesses engage customers even outside the 24-hour customer service window.

These templates can include dynamic placeholders for personalization (like customer names, offer amounts, or expiry dates), along with media and buttons to increase engagement.

Example Template

Marketing Template Message Example

Example of a marketing template message with personalized placeholders and buttons.

This message uses placeholders such as {{1}}, {{2}}, and {{3}} which are dynamically replaced with customer data when the template is sent.

cURL
curl -X POST '<BASE_URL>/api/whatsapp/template' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-d '{
  "template_name": "spring_festival_sale",
  "template_language": "en",
  "contacts": [
    "<WHATSAPP_USER_PHONE_NUMBER>"
  ],
  "components": {
    "broadcast_title_type": "text",
    "broadcast_title_value": "",
    "variables": [
      {
        "variable": "{{1}}",
        "type": "text",
        "value": "Italy",
        "is_user": false
      },
      {
        "variable": "{{2}}",
        "type": "currency",
        "value": "5",
        "currency_code": "KWD"
      },
      {
        "variable": "{{3}}",
        "type": "text",
        "value": "SPRING35",
        "is_user": false
      },
      {
        "variable": "{{4}}",
        "type": "date_time",
        "value": "2026-02-28 12:15:00"
      }
    ],
    "button_variables": [
      {
        "type": "url",
        "variables": [
          {
            "variable": "{{1}}",
            "type": "text",
            "value": "italy"
          }
        ]
      },
      {
        "type": "url",
        "variables": [
          {
            "variable": "{{1}}",
            "type": "text",
            "value": "italy"
          }
        ]
      },
      {
        "type": "copy_code",
        "example": "SPRING35"
      },
      {
        "type": "phone_number",
        "variables": []
      },
      {
        "type": "quick_reply",
        "variables": []
      },
      {
        "type": "quick_reply",
        "variables": []
      },
      {
        "type": "quick_reply",
        "variables": []
      },
      {
        "type": "quick_reply",
        "variables": []
      },
      {
        "type": "quick_reply",
        "variables": []
      },
      {
        "type": "quick_reply",
        "variables": []
      }
    ],
    "header_components": [
      {
        "variable": "{{1}}",
        "type": "text",
        "value": "Mega"
      }
    ]
  }
}'

Parameters

ParameterTypeDescriptionExample
ACCESS_TOKENString
Required
Whatsapp external api authorization token provided by business account.
ERYHCDIRMWORYFFEXESJDKR6SAZABA
CONTACTSArray
Required
Array of WhatsApp user phone numbers with country code.
["<WHATSAPP_USER_PHONE_NUMBER>"]
TEMPLATE_NAMEString
Required
The name of the approved WhatsApp marketing template to send.
spring_festival_sale
TEMPLATE_LANGUAGEString
Required
Language code for the template (e.g., en for English).
en
BROADCAST_TITLE_TYPEString
Required
Type of broadcast title (e.g., none, text, image, video, document).
image
BROADCAST_TITLE_VALUEString
Optional
Only required if type is not none or text. URL or value for the broadcast title.
https://example.com/image.jpg
VARIABLESArray
Required
Array of placeholder objects used in the template body. Each object contains:
  • variable: placeholder like {{1}}, {{2}}
  • type: type of value; one of text, date_time, or currency
  • value: dynamic value to replace the placeholder when sending the template
  • is_user: boolean indicating if the variable is user-specific (true) or static (false)
  • currency_code: required for currency type (e.g.,"USD", "KWD", "EUR")

Note: For date_time type, use format YYYY-MM-DD HH:mm:ss (e.g., "2026-02-28 12:15:00")
[ { "variable": "{{1}}", "type": "text", "value": "Italy", "is_user": false }, { "variable": "{{2}}", "type": "currency", "value": "5", "currency_code": "KWD", "is_user": false }, { "variable": "{{3}}", "type": "text", "value": "SPRING35", "is_user": false }, { "variable": "{{4}}", "type": "date_time", "value": "2026-02-28 12:15:00" } ]
BUTTON_VARIABLESArray
Optional
Array of button objects. Each button object contains:
  • type: button type; one of url, copy_code, phone_number, or quick_reply
  • variables: array of variable objects (required for url type buttons). Each variable object contains:
    • variable: placeholder like {{1}}
    • type: type of value (e.g., text)
    • value: dynamic value to replace the placeholder
  • example: example value for copy_code type buttons (e.g., "SPRING35")

Note: For url type buttons, the variable.value can be up to 2000 characters long. For copy_code, phone_number, and quick_reply buttons, the variables array should be empty.
[ { "type": "url", "variables": [ { "variable": "{{1}}", "type": "text", "value": "italy" } ] }, { "type": "copy_code", "example": "SPRING35" }, { "type": "phone_number", "variables": [] }, { "type": "quick_reply", "variables": [] } ]
HEADER_COMPONENTSArray
Optional
Array of header variable objects. Used when the template has a header with dynamic placeholders. Each object contains:
  • variable: placeholder like {{1}}, {{2}}
  • type: type of value (e.g., text, image, video, document)
  • value: dynamic value to replace the placeholder when sending the template

Note: Only include this field if your template has header components with variables. For carousel templates, headers are defined at the card level within carousel_variables, not here.
[ { "variable": "{{1}}", "type": "text", "value": "Mega" } ]

Utility Template Message

Utility template messages are pre-approved WhatsApp templates used for transactional updates, confirmations, alerts, or notifications about services and operations. They help businesses provide timely information to customers.

These templates can include dynamic placeholders to personalize the message (like customer name, service name, or support email), and can also include media like images.

Example Template

Utility Template Message Example

Example of a utility template message with personalized placeholders.

This message uses placeholders such as {{1}}, {{2}}, and {{3}} which are dynamically replaced with customer data when the template is sent.

cURL
curl -X POST '<BASE_URL>/api/whatsapp/template' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-d '{
  "template_name": "booking_confirmation",
  "template_language": "en",
  "contacts": [
    "+15550185"
  ],
  "components": {
    "broadcast_title_type": "document",
    "broadcast_title_value": "https://example.com/document.pdf",
    "variables": [
      {
        "variable": "{{1}}",
        "type": "text",
        "value": "Alex",
        "is_user": false
      },
      {
        "variable": "{{2}}",
        "type": "currency",
        "value": "1",
        "currency_code": "USD"
      },
      {
        "variable": "{{3}}",
        "type": "date_time",
        "value": "2025-11-20 10:30:00"
      }
    ],
    "button_variables": [
      {
        "type": "url",
        "variables": [
          {
            "variable": "{{1}}",
            "type": "text",
            "value": "12345"
          }
        ]
      },
      {
        "type": "phone_number",
        "variables": []
      },
      {
        "type": "quick_reply",
        "variables": []
      }
    ]
  }
}'

Parameters

ParameterTypeDescriptionExample
ACCESS_TOKENString
Required
Whatsapp external api authorization token provided by business account.
ERYHCDIRMWORYFFEXESJDKR6SAZABA
CONTACTSArray
Required
Array of WhatsApp user phone numbers with country code.
["<WHATSAPP_USER_PHONE_NUMBER>"]
TEMPLATE_NAMEString
Required
The name of the approved utility template to send.
booking_confirmation
TEMPLATE_LANGUAGEString
Required
Language code for the template (e.g., en for English).
en
BROADCAST_TITLE_TYPEString
Required
Type of broadcast title (e.g., none, text, image, video, document).
document
BROADCAST_TITLE_VALUEString
Optional
Only required if type is not none or text. URL or value for the broadcast title. For document type, provide the full URL to the document file.
https://example.com/document.pdf
VARIABLESArray
Required
Array of placeholder objects used in the template body. Each object contains:
  • variable: placeholder like {{1}}, {{2}}, or {{3}}
  • type: type of value; one of text, date_time, or currency
  • value: dynamic value to replace the placeholder when sending the template
  • is_user: boolean indicating if the variable is user-specific (true) or static (false)
  • currency_code: required for currency type (e.g., "USD", "KWD", "EUR")

Note: For date_time type, use format YYYY-MM-DD or YYYY-MM-DD HH:mm:ss (e.g., "2025-11-20" or "2025-11-20 10:30:00")
[ { "variable": "{{1}}", "type": "text", "value": "Alex", "is_user": false }, { "variable": "{{2}}", "type": "currency", "value": "1", "currency_code": "USD", "is_user": false }, { "variable": "{{3}}", "type": "date_time", "value": "2025-11-20 10:30:00" } ]
BUTTON_VARIABLESArray
Optional
Array of button objects. Each button object contains:
  • type: button type; one of url, phone_number, or quick_reply
  • variables: array of variable objects (required for url type buttons). Each variable object contains:
    • variable: placeholder like {{1}}
    • type: type of value (e.g., text)
    • value: dynamic value to replace the placeholder

Note: For url type buttons, the variable.value can be up to 2000 characters long. For phone_number and quick_reply buttons, the variables array should be empty.
[ { "type": "url", "variables": [ { "variable": "{{1}}", "type": "text", "value": "12345" } ] }, { "type": "phone_number", "variables": [] }, { "type": "quick_reply", "variables": [] } ]
HEADER_COMPONENTSArray
Optional
Array of header variable objects. Used when the template has a header with dynamic placeholders. Each object contains:
  • variable: placeholder like {{1}}, {{2}}
  • type: type of value (e.g., text, image, video, document)
  • value: dynamic value to replace the placeholder when sending the template

Note: Only include this field if your template has header components with variables. Many utility templates do not have header components, in which case this field can be omitted or set to null.
null // or if header has variables: [ { "variable": "{{1}}", "type": "text", "value": "Header Text" } ]

Authentication Template Message

Authentication template messages are pre-approved WhatsApp templates used for sending verification codes, OTPs (One-Time Passwords), and authentication tokens to users. They help businesses securely verify user identity and authenticate transactions.

These templates typically include one dynamic placeholder for the authentication code (like {{1}} for the verification code). Authentication templates usually do not include media headers and focus on delivering the verification code clearly and securely.

Example Template

Authentication Template Message Example

Example of an authentication template message with verification code placeholder.

Authentication templates contain only one variable - the verification code placeholder{{1}} which is dynamically replaced with the authentication code (e.g., "8528") when the template is sent. The broadcast_title_type is typically set to "none" for authentication templates.

cURL
curl -X POST '<BASE_URL>/api/whatsapp/template' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-d '{
  "template_name": "authentication_otp",
  "template_language": "en",
  "contacts": [
    "<WHATSAPP_USER_PHONE_NUMBER>"
  ],
  "components": {
    "broadcast_title_type": "none",
    "broadcast_title_value": "",
    "variables": [
      {
        "variable": "{{1}}",
        "type": "text",
        "value": "8528"
      }
    ]
  }
}'

Parameters

ParameterTypeDescriptionExample
ACCESS_TOKENString
Required
Whatsapp external api authorization token provided by business account.
ERYHCDIRMWORYFFEXESJDKR6SAZABA
CONTACTSArray
Required
Array of WhatsApp user phone numbers with country code.
["<WHATSAPP_USER_PHONE_NUMBER>"]
TEMPLATE_NAMEString
Required
The name of the approved authentication template to send.
authentication_otp
TEMPLATE_LANGUAGEString
Required
Language code for the template (e.g., en for English).
en
BROADCAST_TITLE_TYPEString
Required
Type of broadcast title (e.g., none, text, image, video, document). For authentication templates, this is typically set to "none".
none
BROADCAST_TITLE_VALUEString
Optional
Only required if type is not none or text. URL or value for the broadcast title. For authentication templates with broadcast_title_type: "none", this should be an empty string.
VARIABLESArray
Required
Array of placeholder objects used in the template. For authentication templates, this array contains only one variable - the verification code. Each object contains:
  • variable: placeholder {{1}} for the verification code
  • type: type of value; for authentication templates, this is always "text"
  • value: the verification code value (e.g., "8528") that replaces the placeholder when sending the template

Important: Authentication templates contain only one variable in the array - the verification code. The value is the authentication code (e.g., "8528").
[ { "variable": "{{1}}", "type": "text", "value": "8528" } ]