The simplest template send: an approved template name, a language code, and body variables.
The sandbox blocks template sends. Test templates against a connected WhatsApp number, not the sandbox.
Request
curl -X POST "${WHATSAPP_API_URL}/${WHATSAPP_PHONE_NUMBER_ID}/messages" \
-H "Authorization: Bearer ${WHATSAPP_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"messaging_product": "whatsapp",
"to": "15551234567",
"type": "template",
"template": {
"name": "order_confirmation",
"language": {
"code": "en_US"
},
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Alex"
},
{
"type": "text",
"text": "1234"
}
]
}
]
}
}'
Both the sandbox (WHATSAPP_API_URL) and your own number (META_GRAPH_API_URL) point at the HookMyApp gateway and authenticate with your hmat_… token; the gateway swaps in the real Meta token server-side. The body is identical. See Overview for the full setup.