Skip to main content
Template messages are pre-approved message formats required for initiating conversations with users outside the 24-hour customer service window.

When to Use Templates

WhatsApp requires templates for:
  • Proactive outreach - Contacting users who haven’t messaged you recently
  • Notifications - Order updates, appointment reminders, shipping alerts
  • Transactional messages - Receipts, confirmations, account updates
Once a user responds to your template message, you have a 24-hour window to send regular messages without using templates.

Basic Example

Send Template Message

Templates with Variables

Most templates include placeholders for dynamic content:
Template with Variables
For a template like "Hi {{1}}, your order #{{2}} for {{3}} has been confirmed!", this would render as:
Hi John, your order #12345 for $99.00 has been confirmed!

Request Parameters

Language Codes

Common language codes:

Template Categories

WhatsApp templates are categorized by purpose:
Marketing templates require explicit user opt-in and have stricter approval requirements.

Creating Templates

Templates must be created and approved through the WhatsApp Business Manager before use:
  1. Log in to WhatsApp Business Manager
  2. Navigate to WhatsApp > Message Templates
  3. Create a new template with your desired content
  4. Submit for approval (typically 24-48 hours)
  5. Once approved, use the template name in your API calls

Response

Response

Error Handling

Common template errors: