Updated on November 24, 2026
WhatsApp template variables are placeholders in double curly braces that you fill in at send time. When you create the template, the parameter_format field sets the type: positional, with numbers like {{1}} and {{2}} (the default if you leave it out), or named, with names like {{first_name}}. Either way, every variable needs a sample value, and Meta rejects templates that start or end with a variable or that have too many variables for the length of the text.
This article covers template creation: how to write the variables, where the samples go and when to pick each format. The sending side, and errors 132000 and 132012, are covered in template parameter format errors.
Positional vs named: Meta’s rules
The rules are on Meta’s template fundamentals page:
Positional (positional) | Named (named) | |
|---|---|---|
| Placeholder in the text | {{1}}, {{2}}, {{3}} | {{first_name}}, {{order_number}} |
| Placeholder rule | Sequential numbers starting at 1 | Unique names, lowercase letters and underscores only |
| Body sample | example.body_text (list in text order) | example.body_text_named_params (param_name + example pairs) |
| Text header sample | example.header_text | example.header_text_named_params |
| Order of samples and values | Must follow the order in which placeholders appear | Any order |
| Default | Yes, if parameter_format is omitted | Only with parameter_format: "named" |
The format applies to the whole template: you cannot mix {{1}} and {{name}} in the same template.
Naming rules for named variables
The documentation says named parameters must be unique and made of lowercase letters and underscores. In practice:
| Name | Status |
|---|---|
first_name | Valid |
due_date | Valid |
FirstName | Breaks the rule (uppercase) |
first-name | Breaks the rule (hyphen) |
café_name | Breaks the rule (accented letter) |
name 2 | Breaks the rule (space and digit) |
The published rule does not mention digits, so leave them out of names. Pick names that describe the data (tracking_code), not the position (variable_3): the whole point of the named format is being able to read the template and the sending code without counting braces.
Want to try it while you read? Create a Vectalk account and send your first message through the official API. Create free account →
Example 1: body with positional variables
With positional variables, samples go in body_text, an array inside an array, in the same order as the placeholders:
{
"name": "appointment_confirmed",
"language": "en_US",
"category": "UTILITY",
"components": [
{
"type": "BODY",
"text": "Hi {{1}}, your appointment with {{2}} is confirmed for {{3}}. Reply to this message if you need to reschedule.",
"example": {
"body_text": [["Anna", "Dr. Paula Lima", "Dec 2 at 2 PM"]]
}
}
]
}
Notice that the text neither starts nor ends with a variable and that there are words between the placeholders. If you rewrite the sentence and the date moves before the doctor’s name, you have to renumber the placeholders and reorder the samples.
Example 2: the same template with named variables
{
"name": "appointment_confirmed_v2",
"language": "en_US",
"category": "UTILITY",
"parameter_format": "named",
"components": [
{
"type": "BODY",
"text": "Hi {{first_name}}, your appointment with {{provider}} is confirmed for {{date_time}}. Reply to this message if you need to reschedule.",
"example": {
"body_text_named_params": [
{ "param_name": "first_name", "example": "Anna" },
{ "param_name": "provider", "example": "Dr. Paula Lima" },
{ "param_name": "date_time", "example": "Dec 2 at 2 PM" }
]
}
}
]
}
Each param_name must match the name inside the braces exactly. At send time, each value carries the same name in the parameter_name field, as shown in how to send a template through the API.
Example 3: text header with a variable
A text header accepts one variable and up to 60 characters, according to the template components page. In the named format, the sample goes in header_text_named_params:
{
"name": "order_shipped_v2",
"language": "en_US",
"category": "UTILITY",
"parameter_format": "named",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Order {{order_number}} is on its way",
"example": {
"header_text_named_params": [
{ "param_name": "order_number", "example": "#4821" }
]
}
},
{
"type": "BODY",
"text": "Hi {{first_name}}! Your order is out for delivery and should arrive by {{eta}}. Track it with the link below.",
"example": {
"body_text_named_params": [
{ "param_name": "first_name", "example": "Carlos" },
{ "param_name": "eta", "example": "Nov 28" }
]
}
}
]
}
In the positional format, the same header would be "text": "Order {{1}} is on its way" with "example": { "header_text": ["#4821"] }. Note the difference: header_text is a flat array, while body_text is an array of arrays. The limits for each part are in template character limits.
Example 4: URL button with a variable
A URL button accepts one variable, always at the end of the URL, and the sample is required when it is there. The documentation’s example uses a numbered placeholder:
{
"type": "BUTTONS",
"buttons": [
{
"type": "URL",
"text": "Track order",
"url": "https://shop.example.com/tracking/{{1}}",
"example": ["BR123456789"]
}
]
}
The same page shows, in its sending section, a URL button filled with parameter_name, that is, by name. Since creating a named URL button is not shown in an example, do this: once the template is approved, list it with GET /<WABA_ID>/message_templates and check how the URL was stored; your send payload should mirror it. Also remember that the value you send must have special characters percent-encoded. To use that suffix for tracking, see dynamic URL in the template button.
Variable mistakes that get a template rejected
The template review page lists these rejection reasons under parameter formatting:
| Problem | Wrong | How to fix |
|---|---|---|
| Template starts or ends with a variable | {{1}}, your order has shipped. | Hi {{1}}, your order has shipped. |
| Too many variables for the text length | Hi {{1}}: {{2}}, {{3}}, {{4}} and {{5}} today. | Fewer variables or more fixed text |
| Numbers out of sequence | {{1}}, {{2}}, {{5}}, {{4}} | {{1}}, {{2}}, {{3}}, {{4}} |
| Missing or mismatched braces | {1}}, {{2} | {{1}}, {{2}} |
| Special characters in the variable | {{#1}}, {{$amount}} | {{1}}, {{amount}} |
| Missing sample | Variable with no example | One sample per variable |
Meta does not publish an exact text-to-variable ratio. It only says that too many parameters relative to the message length lead to rejection, and that the fix is to cut variables or add text. A good rule of thumb: the fixed text should explain the reason for the message on its own. If you delete the variables and the sentence stops making sense, the template is probably too generic.
The review page does not address side-by-side variables such as {{1}} {{2}}. Even so, putting words between them helps the reviewer understand the content and avoids odd messages when a value comes in short. Instead of {{first_name}} {{last_name}}, use a single {{full_name}}.
Another point that is not an API error but does lead to rejection: samples should be realistic. A sample like “test” or “xxx” does not show the reviewer what the customer will receive. Other rejection reasons are covered in WhatsApp template rejected: common reasons and fixes.
When to choose each format
Choose named variables when:
- The template has three or more variables and the order confuses whoever maintains the code.
- Several teams edit the copy: reordering sentences does not require renumbering anything.
- The data comes from a CRM or database with named fields (
first_name,due_date): the mapping is direct, with no “1 = name, 2 = date” lookup table. - You keep the same template in several languages, where natural word order changes from one language to another.
Positional variables still make sense when:
- The template has one or two variables and is not going to change.
- The system or tool that sends the template only builds parameters by position. Check your tool’s documentation for
parameter_namesupport before creating named templates.
Multi-language templates are covered in WhatsApp templates in multiple languages.
How to migrate a positional template to named
The template management page says you can only edit category, components and time-to-live. parameter_format is not on that list, so the safe path is to create a new template:
- List the current template without the
fieldsparameter: the response includesparameter_format,componentsand the samples. - Create a named version under a new name (
appointment_confirmed_v2), replacing{{1}},{{2}}with names andbody_textwithbody_text_named_params. - Wait for approval and update your sending code to pass
parameter_name. - Switch the template name in your system and watch for errors for a few days.
- Only then delete the old one. Keep in mind that the name of a deleted approved template cannot be reused for 30 days.
The full create, edit and delete flow through the API is in create a WhatsApp template via API.
How to do this with Vectalk
Vectalk is a proxy for the official WhatsApp Business API (Cloud API), so template JSON is the same as Meta’s. You can create templates in the dashboard, in the templates area with the Template Library, or through the Create Template endpoint (POST https://apis.vectalk.com.br/api/templates, with an instance token). Messages are sent with POST https://apis.vectalk.com.br/api/messages, as described in the send template reference, and the dashboard logs help you investigate failed sends. To try it, sign up at apps.vectalk.com.br/register.
Frequently asked questions
Do named variables change the template price?
No. Cost depends on the category and the recipient’s country, not on the variable format. Run the numbers in the pricing calculator.
Can I use accents or uppercase letters in a variable name?
No. Meta’s rule is lowercase letters and underscores. Use delivery_address, not DeliveryAddress. The value you send, on the other hand, can contain accents and any normal text.
Can I switch an approved template from positional to named?
Editing only accepts category, components and time-to-live. To change the format, create a new template with parameter_format: "named".
Can the template start with the customer’s name?
Not as a variable. Review rejects templates that start or end with a parameter. Put a fixed greeting first: “Hi {{first_name}}”.
How many variables can I use in the body?
Meta does not publish a maximum. The body accepts multiple variables within the 1,024-character limit, but templates with too many variables relative to the text are rejected.
Official sources checked on November 24, 2026: Template fundamentals (Meta), Template components (Meta), Template review (Meta), Template management (Meta), Vectalk: Create Template, Vectalk: send template.
Put your business on the official WhatsApp
Create your account, connect your number to the official API (you can keep the app with coexistence) and start serving customers and sending messages.
