Sending templates

A template is a message WhatsApp approved in advance. It is the only way to reach a customer outside the 24 hour window, and therefore the only way to start a conversation.

To send one, add template_params to the same send request:

1{
2 "inbox_id": 5,
3 "phone_number": "+971500000000",
4 "content": "Hi, your order 121212 is confirmed",
5 "template_params": {
6 "name": "order_confirmation",
7 "language": "en",
8 "category": "UTILITY",
9 "processed_params": { "body": { "1": "121212" } }
10 }
11}

Write content so it reads like the rendered template. Your agents see it in the thread and search matches on it. The API does not send it to WhatsApp.

Find a template name

You create templates in Meta’s Business Manager. Once Meta approves them, they sync to your inbox. To read the name, language, and category, open Settings > Inboxes > your WhatsApp inbox > Templates.

This version of the API has no endpoint for listing templates.

language must match the approved template exactly. To WhatsApp, en and en_US are different templates, and a mismatch fails at delivery time, after you have already received your 201.

Fill in the placeholders

processed_params maps each component of the template to its values.

The shape depends on which provider is behind your WhatsApp inbox, so check Settings > Inboxes > your inbox before you build the payload.

A template written with {{1}}, {{2}} placeholders:

1{ "processed_params": { "body": { "1": "121212", "2": "3 days" } } }

A template with no placeholders needs no processed_params. Send name, language, and category alone.

After the template

Once the customer replies, the 24 hour window opens. Until it closes again, you can send plain content with no template_params.