Create a WhatsApp template
This endpoint creates a WhatsApp template in Design Studio. Creating a template doesn't send anything to Meta. Before you can send the template to your audience, you need to submit it to Meta for approval, and Meta needs to approve it.
You write the template's content as WhatsApp markup, a set of elements that match the components you can add in Design Studio. See WhatsApp building blocks for every element and the rules the markup follows.
Make sure the template's content, category, and language are right before you submit it. After you submit a template, you can't change those fields unless Meta rejects it.
- Type: string enumcategoryrequired
The Meta template category. Use
MARKETINGfor promotional content andUTILITYfor non-promotional messages about a transaction, like an order update. You can't create Authentication templates in Design Studio. Learn more about template categories in Meta's docs.values- M
A R K E T I N G - U
T I L I T Y
- Type: stringcontentmin length:1required
The template, written as WhatsApp markup. Put your message text in an
<x-wa-body>element inside an<x-whatsapp>element; the text can include liquid. You can also add a header or header media, a footer, and buttons. See WhatsApp building blocks for every element. - Type: stringlanguagemin length:1required
The Meta language code for the template, like
en_US. You need to create a separate template for each language you want to support. - Type: stringnamemin length:1max length:191required
A friendly name for the template. Your team sees this name in Design Studio, so pick one that helps them find the template. Customer.io also uses it as the basis for the template name it gives Meta when you submit the template.
- Type: stringrecipientmin length:1required
Liquid that resolves to the WhatsApp phone number of the person you're messaging, like
{{customer.phone}}. Customer.io evaluates it against that person's profile when it sends the message. Don't set a static phone number here; if you do, every send of this template goes to that one number instead of to each person. - Type: string | null Format: uuidparent
_folder _id UUID of the folder to create the template in. Omit or pass
nullto create the template at the root level. You can list folders to find the UUID of the folder you want. - Type: integer | null Format: int64sender
_id min:1The ID of the WhatsApp sender identity to send the template from. You can list sender identities to find the ID you want. The sender must be a WhatsApp sender, not an SMS or email sender.
- application/json
- application/json
- application/json
- application/json
- application/json
{
"category": "UTILITY",
"content": "<x-whatsapp><x-wa-body>Hi {{customer.first_name}}, your order has shipped.</x-wa-body></x-whatsapp>",
"language": "en_US",
"name": "Order shipped",
"recipient": "{{customer.phone}}",
"parent_folder_id": null,
"sender_id": 4
}
{
"whatsapp": {
"category": "UTILITY",
"content": "<x-whatsapp><x-wa-body>Hi {{customer.first_name}}, your order has shipped.</x-wa-body></x-whatsapp>",
"created": 1790000000,
"id": "123e4567-e89b-12d3-a456-426614174000",
"is_linked": true,
"is_template": true,
"language": "en_US",
"name": "Order shipped",
"parent_folder_id": null,
"recipient": "{{customer.phone}}",
"sender_id": 4,
"status": "APPROVED",
"updated": 1790000000
}
}WhatsApp template created