Documentation Index
Fetch the complete documentation index at: https://docs.kaanha.ai/llms.txt
Use this file to discover all available pages before exploring further.
Messaging & Templates
WhatsApp Message Templates
Templates are pre-approved messages required for:
- Starting a new conversation with a contact
- Messaging contacts who haven’t replied in the last 24 hours
- Sending broadcasts
Templates must be approved by Meta before use. Approval typically takes 24-48 hours.
Creating a Template
- Go to Templates → Create Template
- Fill in:
| Field | Description |
|---|
| Name | Internal identifier (lowercase, underscores) |
| Category | MARKETING, UTILITY, or AUTHENTICATION |
| Language | en_US, en_GB, hi, ar, etc. |
| Header | (Optional) Text, image, video, or document |
| Body | Main message content — supports {{1}}, {{2}} variables |
| Footer | (Optional) Small text at the bottom |
| Buttons | (Optional) Call-to-action or quick reply buttons |
- Preview the template on the right panel
- Click Submit to Meta for approval
Template Categories
| Category | Use Cases | Conversation Cost |
|---|
| MARKETING | Promotions, offers, newsletters | Charged per conversation |
| UTILITY | Order updates, account alerts, shipping | Charged per conversation |
| AUTHENTICATION | OTP, verification codes | Charged per message |
Template Variables
Templates use numbered variables {{1}}, {{2}}, etc. for personalization. These are substituted at send time.
Example template body:
Hi {{1}}, your order {{2}} has been confirmed!
Expected delivery: {{3}}
Example substitution:
{
"components": [{
"type": "body",
"parameters": [
{ "type": "text", "text": "John" },
{ "type": "text", "text": "#ORD-12345" },
{ "type": "text", "text": "March 28, 2026" }
]
}]
}
If you’ve created templates directly in Meta Business Manager:
- Go to Templates → Sync from Meta
- All approved templates are imported automatically
Or sync an individual template with the Sync button on the template card.
Rejected Templates
If Meta rejects your template, you’ll see a rejection reason on the template card:
| Common Rejection Reason | Fix |
|---|
| Contains promotional content in UTILITY category | Change category to MARKETING |
| Variable placeholder at start/end of message | Add text before/after {{1}} |
| Prohibited content (medications, gambling, etc.) | Remove violating content |
| Duplicate of existing template | Rename or modify content |
Click Edit & Resubmit to fix and resubmit without creating a new template.
Templates support up to 3 buttons:
| Button Type | Description |
|---|
| Quick Reply | Contact taps to send a predefined reply |
| Call to Action — URL | Opens a website URL |
| Call to Action — Phone | Calls a phone number |
Template Preview
Use the mobile preview toggle to see how the template will appear on a WhatsApp mobile device before submitting.
Sending Templates
From Chat:
- Open a conversation
- If the 24h window is closed, only the template picker appears
- Select a template, fill in variables, and send
From Broadcasts:
See Broadcasts & Campaigns
Via API:
POST /api/whatsapp-api/send
Authorization: Bearer YOUR_API_KEY
{
"to": "+919876543210",
"type": "template",
"template": {
"name": "order_confirmation",
"language": "en",
"components": [{
"type": "body",
"parameters": [
{ "type": "text", "text": "John" },
{ "type": "text", "text": "#ORD-12345" }
]
}]
}
}