Skip to Content
Developers

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"      }    }  }'
FieldTypeRequiredDescription
template.namestringYesThe template name, as approved by WhatsApp.
template.parametersarrayNoValues for the placeholders {{1}}, {{2}}…, in order.
whatsapp.policystringNodeterministic: use exactly the language in locale.
whatsapp.localestringNoThe 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.