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
"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:Creating Templates
Templates must be created and approved through the WhatsApp Business Manager before use:- Log in to WhatsApp Business Manager
- Navigate to WhatsApp > Message Templates
- Create a new template with your desired content
- Submit for approval (typically 24-48 hours)
- Once approved, use the template name in your API calls
Response
Response