Template
Send an approved template, also outside the 24-hour window.
POST
/v1/numbers/{phone_number}/messages/sendReference →
curl -X POST "$WAPIU_API/v1/numbers/$WAPIU_NUMBER/messages/send" \ -H "Authorization: Bearer $WAPIU_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "recipient": "+393331112222", "message": { "message_type": "template", "template": { "name": "order_shipped", "parameters": [ "Mario", "A1234" ] }, "whatsapp": { "policy": "deterministic", "locale": "it" } } }'| Field | Type | Required | Description |
|---|---|---|---|
template.name | string | Yes | The template name, as approved by WhatsApp. |
template.parameters | array | No | Values for the placeholders {{1}}, {{2}}…, in order. |
whatsapp.policy | string | No | deterministic: use exactly the language in locale. |
whatsapp.locale | string | No | The template language, e.g. it or en_US. Default en_US. |
Templates are the only messages you can send outside the 24-hour window, so use them to start a conversation.
Only approved templates can be sent. To list, create or check yours, see Manage templates.
The response and errors are the same for every type: see Send a message.