Create a WhatsApp template
flow_create_whatsapp_templateSaves a new MARKETING or UTILITY WhatsApp template as a draft on one of the brand's WhatsApp senders (ids from flow_list_senders): an optional text header, the body, an optional footer and buttons. Name, language and category cannot change later. An image header, an offer, a carousel or an authentication template is built in the portal. Variables are written {{name}} in lowercase letters and underscores. {{first_name}} (fallback up to 20 characters), {{city}} (30) and {{phone_number}} come from the contact; every variable but {{phone_number}} needs a fallback, sent when there is no value. For a name of your own, and a link's trailing variable, the fallback is what a campaign sends and the example Meta's reviewer reads; an API send can give its own value. Meta's rules apply: no variable at the start or end of the text or next to another, a text header with at most one variable, a footer without one, at most 10 buttons (2 URL, 1 PHONE_NUMBER, 1 COPY_CODE, which is MARKETING only) with quick replies together. Saved as a draft: Meta sees it only once it is submitted in the portal. The answer gives its link and preview: the message as a recipient sees it, each variable filled with its fallback.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"senderId": "<senderId>",
"name": "<name>",
"language": "<language>",
"category": "<category>",
"body": "<body>"
},
"name": "flow_create_whatsapp_template"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | ||
| name | Yes | Lowercase letters, digits and underscores | |
| footer | No | ||
| header | No | ||
| brandId | No | The id of the brand this change is for: the active brand (flow_whoami). Required when the connection covers several brands; the change is refused when another brand is active. | |
| buttons | No | ||
| category | Yes | ||
| language | Yes | Meta's language code, e.g. en, en_US, hr, de | |
| senderId | Yes | ||
| fallbacks | No | Variable name → its fallback; every variable but {{phone_number}} needs one |