Messages
Send template messages
Send pre-approved WhatsApp templates to start or reopen conversations.
Template messages are pre-approved by Meta and can be sent outside the 24-hour service window. Use them to initiate conversations, send marketing campaigns, or send utility notifications.
Template categories
| Category | Use case | Meta cost |
|---|---|---|
| Marketing | Promotions, offers, retargeting | Highest |
| Utility | Order updates, shipping, receipts | Medium |
| Authentication | OTP codes, login verification | Medium |
| Service | Replies within 24h window | Free |
Send a template
await supabase
.from('messages')
.insert({
organization_id: 'your-org-id',
organization_address: 'phone-number-id',
contact_address: '5215588392274',
service: 'whatsapp',
direction: 'outgoing',
content: {
type: 'data',
kind: 'template',
template: {
name: 'hello_world',
language: { code: 'en_US' },
components: []
}
}
});Template with variables
content: {
type: 'data',
kind: 'template',
template: {
name: 'order_confirmation',
language: { code: 'es' },
components: [
{
type: 'body',
parameters: [
{ type: 'text', text: 'Juan' },
{ type: 'text', text: '#12345' },
{ type: 'text', text: '$99.00' }
]
}
]
}
}Template with media header
content: {
type: 'data',
kind: 'template',
template: {
name: 'promo_with_image',
language: { code: 'en_US' },
components: [
{
type: 'header',
parameters: [
{
type: 'image',
image: { link: 'https://example.com/promo.jpg' }
}
]
}
]
}
}Managing templates
Templates are created and managed through:
- The wakit dashboard (Templates section)
- Meta's WhatsApp Manager
- The WhatsApp Cloud API directly
Templates must be approved by Meta before they can be sent. Approval typically takes minutes to hours.
Meta pricing
Meta charges per template message sent. Pricing varies by country and category. See Meta's official pricing.
If a customer messages you first and you reply within the 24-hour service window using a text message, there is no Meta fee. Template fees only apply when you initiate conversations or send outside the window.