Updated on November 10, 2026
WhatsApp Business API error 132012 means the values you sent for the template’s variables are not in the format the template defines. The count may even be right (otherwise you would get 132000), but the type or shape of a parameter does not match: a named variable sent without parameter_name, text sent to an image header, a creation handle used at send time, or a URL button value that was not encoded. Error 132018 is a parameter validation error documented in the Marketing Messages API table, and you fix it the same way.
This article explains what Meta expects for each parameter type and shows the correct payload for the cases that cause the most errors.
What the documentation says about each code
On the Cloud API error codes page:
| Code | Where it appears in the docs | Official description (summary) | Suggested fix |
|---|---|---|---|
132000 | General errors | Number of parameters sent differs from the number defined in the template | Send values for every parameter |
132012 | General errors | Parameter values formatted incorrectly | Use the format the template specifies |
132018 | Marketing Messages API table | “Template validation error”: an issue with the template parameters | Review the errors, fix the parameters and resend with a correctly configured template (HTTP 400) |
One important detail: 132018 is listed only in the Marketing Messages API for WhatsApp (MM API) section, which uses the /<PHONE_NUMBER_ID>/marketing_messages endpoint. Meta says MM API uses the same error codes as Cloud API with a few additions, and 132018 is one of them. If you only send through /messages, the code to expect for a badly formatted parameter is 132012. MM API is covered in our article on MM Lite.
The wrong count (132000) is covered in errors 132000 and 132012. Here the focus is format.
Named or positional: the most common mistake
When you create a template, you choose its parameter_format: named or positional. If you do not set it, Meta uses positional. The send rules change with that choice, according to the template fundamentals page:
| Positional | Named | |
|---|---|---|
| In the template text | {{1}}, {{2}} | {{first_name}}, {{order_number}} |
| Naming rule | Indexes starting at 1 | Unique, lowercase letters and underscores only |
| At send time | Values in the order they appear in the text | Each value with parameter_name |
Positional template, correct send:
{
"type": "body",
"parameters": [
{ "type": "text", "text": "Ana" },
{ "type": "text", "text": "ORD-4821" }
]
}
Named template, correct send:
{
"type": "body",
"parameters": [
{ "type": "text", "parameter_name": "first_name", "text": "Ana" },
{ "type": "text", "parameter_name": "order_number", "text": "ORD-4821" }
]
}
The mismatches that cause errors:
- Sending the positional shape to a named template (no
parameter_name). - Spelling
parameter_namedifferently:First_Name,firstNameornamewhen the template definesfirst_name. - Swapping the order in a positional template. The API will not complain here, because the format is right, but the customer gets “Hi, ORD-4821”.
To find out the format of an existing template, look at its components in the template list (GET /<WABA_ID>/message_templates): placeholders like {{1}} mean positional format, and names like {{first_name}}, with examples under body_text_named_params, mean named format.
Want to try it while you read? Create a Vectalk account and send your first message through the official API. Create free account →
Header: text, media or location
The header is the second source of 132012. Each template has at most one header, and the parameter type at send time must match the type defined at creation, according to the template components page:
| Header created as | Parameter at send time |
|---|---|
| Text with 1 variable | { "type": "text", "text": "..." } |
| Image | { "type": "image", "image": { "id": "..." } } |
| Video | { "type": "video", "video": { "id": "..." } } |
| Document | { "type": "document", "document": { "id": "..." } } |
| Location | { "type": "location", "location": { "latitude": "...", "longitude": "...", "name": "...", "address": "..." } } |
A text header supports a single variable and up to 60 characters in the template text. A media header can be an image, video or document (GIF exists only on MM API).
A creation handle is not a media ID
This one bites people who create templates through the API: at creation, the sample media goes in header_handle, an identifier generated by the Resumable Upload API in the 4::aW... format. That handle is only for template review. At send time, media is something else: a media id from the phone number’s media upload, or a link to a hosted file. The image messages documentation marks link as “not recommended”, but it is accepted.
Correct send with an image header and a body variable:
{
"messaging_product": "whatsapp",
"to": "15551234567",
"type": "template",
"template": {
"name": "weekly_offer",
"language": { "code": "en_US" },
"components": [
{
"type": "header",
"parameters": [{ "type": "image", "image": { "id": "1339522734477770" } }]
},
{
"type": "body",
"parameters": [{ "type": "text", "parameter_name": "first_name", "text": "Ana" }]
}
]
}
}
If the media itself has a problem (format, size, unreachable URL), the error is usually a different one. See error 131053 and the guide on sending media.
URL buttons: encoding is required
URL buttons accept one variable, always at the end of the URL. At send time it goes in a button component with sub_type: "url" and index (the button position, starting at "0"). The components page warns that special characters in the value must be percent-encoded before sending, because they can make the generated URL fail validation and cause a send error.
| Character | Encoded | |
|---|---|---|
| Space | %20 | |
: | %3A | |
| `\ | ` | %7C |
ç | %C3%A7 | |
ñ | %C3%B1 |
{
"type": "button",
"sub_type": "url",
"index": "0",
"parameters": [{ "type": "text", "text": "Gon%C3%A7alves" }]
}
Send only the variable part, not the whole URL: if the template is https://shop.example.com/order/{{1}}, the parameter is ORD-4821. Our article on dynamic URL buttons with UTM shows how to build that suffix for tracking.
Checklist to get rid of 132012
- Read the template through the API and note the variable format (named or positional), the header type and any buttons with a variable.
- For
named, sendparameter_nameon every parameter, with the exact spelling. - For
positional, keep the order of the text. - Check the header type:
text,image,video,documentorlocation. - In a media header, use a media
idor alink, never theheader_handle. - Encode URL button variables with
encodeURIComponent(JavaScript) orurllib.parse.quote(Python). - Do not send empty values: if the data may be missing, set a default text in your system.
- Read
error_data.detailsin the response: according to Meta, it may say which parameter is invalid.
Building the payload from the template
The safest way to avoid mistakes is to generate the payload from the template definition instead of writing it by hand. A Python example:
from urllib.parse import quote
def build_components(template: dict, data: dict, media_id: str | None = None) -> list:
named = any("body_text_named_params" in c.get("example", {}) for c in template["components"])
components = []
for c in template["components"]:
kind = c["type"].upper()
if kind == "HEADER" and c.get("format", "TEXT").upper() in ("IMAGE", "VIDEO", "DOCUMENT"):
media = c["format"].lower()
components.append({"type": "header", "parameters": [{"type": media, media: {"id": media_id}}]})
elif kind == "BODY":
names = [p["param_name"] for p in c.get("example", {}).get("body_text_named_params", [])]
if named:
params = [{"type": "text", "parameter_name": n, "text": str(data[n])} for n in names]
else:
params = [{"type": "text", "text": str(v)} for v in data["positional"]]
components.append({"type": "body", "parameters": params})
elif kind == "BUTTONS":
for i, b in enumerate(c["buttons"]):
if b["type"].upper() == "URL" and "{{" in b.get("url", ""):
components.append({
"type": "button", "sub_type": "url", "index": str(i),
"parameters": [{"type": "text", "text": quote(str(data["url_suffix"]), safe="")}],
})
return components
The example covers the body, a media header and a URL button. Extend it for text and location headers if your templates use them.
How it works with Vectalk
Vectalk is a proxy for the official WhatsApp API, and the template object you send to POST https://apis.vectalk.com.br/api/messages is the same as in Cloud API, as shown in the send template reference. Errors 132000 and 132012 come back with Meta’s code unchanged.
For media headers, Vectalk has a media upload endpoint that returns the media_id to use in the image, video or document parameter. To check a template’s variable format, list it with GET https://apis.vectalk.com.br/api/templates?name=<name> using an instance token. The dashboard logs show the payload and the error for each failed send. To get started, create an account at apps.vectalk.com.br/register.
Frequently asked questions
What is the difference between 132000 and 132012?
132000 means the number of parameters you sent differs from the number the template defines. 132012 means the count may be right, but the format of the values does not follow the template.
Can 132018 show up on the /messages endpoint?
The documentation lists 132018 only in the Marketing Messages API table. If you send through /messages, expect 132012 for badly formatted parameters. Either way, handle both the same way in code: it is a payload error and retrying without a fix will not help.
Can I mix named and positional variables in one template?
No. parameter_format applies to the whole template and is set at creation: named or positional.
Do I need to resend the message after fixing it?
Yes. A request rejected with 132012 produces no message and no charge. Fix the payload and send it again.
Official sources consulted on November 10, 2026: Cloud API error codes, Template fundamentals, Template components, Image messages, Sending with the Marketing Messages API, Vectalk: send template.
Try the official WhatsApp API today
Create your account, generate a token and send your first message with the quick-start guide. Same payloads and webhooks as Meta's Cloud API.
