Skip to content

WhatsApp Message Templates

WhatsApp message templates are pre-approved message formats that allow businesses to proactively send messages to customers. Templates must be approved by Meta before they can be used.

Why Use Templates?

  • Proactive messaging — Message customers first (outside the 24-hour window)
  • Consistent branding — Maintain consistent message formatting
  • Faster approval — Approved templates have higher deliverability
  • Rich interactions — Support buttons, calls-to-action, and media

Template Categories

CategoryDescriptionUse Case
MarketingPromotional content, offers, announcementsCampaigns, newsletters
UtilityAccount updates, order confirmations, remindersTransactional messages
AuthenticationOTPs, verification codesLogin, 2-step verification
ServiceCustomer support updatesIssue resolution

Creating a Template

Via Dashboard

  1. Log in to the Galatext Dashboard
  2. Navigate to WhatsApp → Templates
  3. Click Create Template
  4. Fill in template details:
    • Name — Unique identifier (e.g., order_confirmation)
    • Category — Select appropriate category
    • Language — Template language (e.g., en, sw)
    • Content — Message body with placeholders
    • Header — Optional: text, image, document, or video
    • Footer — Optional: small text footer
    • Buttons — Optional: call-to-action or quick reply buttons
  5. Submit for review

Via API

bash
curl -X POST https://api.galatext.com/api/whatsapp/templates \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "name": "order_confirmation",
    "category": "UTILITY",
    "language": "en",
    "components": [
      {
        "type": "HEADER",
        "format": "TEXT",
        "text": "Order Confirmation"
      },
      {
        "type": "BODY",
        "text": "Hi {{1}}, your order {{2}} has been confirmed. Total: {{3}}. Thank you for shopping with us!"
      },
      {
        "type": "FOOTER",
        "text": "Need help? Reply HELP"
      },
      {
        "type": "BUTTONS",
        "buttons": [
          {
            "type": "URL",
            "text": "Track Order",
            "url": "https://your-app.com/orders/{{4}}"
          },
          {
            "type": "QUICK_REPLY",
            "text": "Contact Support"
          }
        ]
      }
    ]
  }'

Response

json
{
  "success": true,
  "data": {
    "id": "tpl_abc123def456",
    "name": "order_confirmation",
    "status": "PENDING",
    "category": "UTILITY",
    "language": "en",
    "createdAt": "2025-06-15T10:30:00Z"
  }
}

Template Content Structure

Body

Required for all templates. Supports text with placeholders.

  • Max 1024 characters
  • Variables numbered 1, 2, etc.
  • Up to 25 variables per template

Header (Optional)

FormatDescriptionMax Size
TEXTText header (max 60 characters)60 chars
IMAGEImage media header5 MB
DOCUMENTDocument header100 MB
VIDEOVideo header16 MB

Small text at the bottom of the template. Max 60 characters.

Buttons (Optional)

Button TypeDescriptionMax
QUICK_REPLYStatic reply buttons3
URLCall-to-action URL buttons2
PHONE_NUMBERCall a phone number1
COPY_CODECopy code to clipboard1 (authentication only)
OTPOne-time password button1 (authentication only)

Approval Process

StepDescriptionTimeframe
1Template submittedInstant
2Automated review1–2 hours
3Meta review1–5 business days
4Approved/RejectedFinal status

Checking Template Status

bash
curl -X GET https://api.galatext.com/api/whatsapp/templates/order_confirmation \
  -H "x-api-key: YOUR_API_KEY"
json
{
  "success": true,
  "data": {
    "id": "tpl_abc123def456",
    "name": "order_confirmation",
    "status": "APPROVED",
    "category": "UTILITY",
    "language": "en",
    "rejectedReason": null,
    "createdAt": "2025-06-15T10:30:00Z",
    "approvedAt": "2025-06-16T14:00:00Z"
  }
}

Possible statuses: PENDING, APPROVED, REJECTED, PAUSED, DISABLED

Common Rejection Reasons

  • Incomplete or misleading variable names
  • Missing opt-out instructions for marketing templates
  • Prohibited content (cryptocurrency, adult, tobacco, etc.)
  • Grammar or formatting issues
  • URLs that don't match business verification

Sending a Template Message

Once approved, send template messages via the WhatsApp API:

bash
curl -X POST https://api.galatext.com/api/whatsapp/messages \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "phoneNumber": "+254712345678",
    "type": "template",
    "template": {
      "name": "order_confirmation",
      "language": {
        "code": "en"
      },
      "components": [
        {
          "type": "header",
          "parameters": []
        },
        {
          "type": "body",
          "parameters": [
            { "type": "text", "text": "Alice" },
            { "type": "text", "text": "ORD-12345" },
            { "type": "text", "text": "KES 2,500" }
          ]
        }
      ]
    }
  }'

Managing Templates

List All Templates

bash
curl -X GET https://api.galatext.com/api/whatsapp/templates \
  -H "x-api-key: YOUR_API_KEY"

Update a Template

To update a template, you must create a new version. Previous versions remain active until the new version is approved.

Delete a Template

bash
curl -X DELETE https://api.galatext.com/api/whatsapp/templates/order_confirmation \
  -H "x-api-key: YOUR_API_KEY"

Best Practices

  • Clear variable names — Use descriptive variable labels for reviewers
  • Test in sandbox — Verify template renders correctly before submission
  • Keep it concise — Shorter templates get approved faster
  • Follow WhatsApp policy — Review Meta's Commerce Policy
  • Multiple languages — Create separate templates for each language
  • Version control — Keep track of template versions and changes

Powered by Galatex Softwares