Updated on November 10, 2026
WhatsApp API error 131008 means the request is missing a required parameter; 131009 means one or more parameters have an invalid value. In both cases the problem is the JSON you sent, and Meta’s guidance is to check the endpoint reference to see which fields are required and which values are accepted. Resending the same payload won’t help: you have to fix the request body.
This article walks through the payload mistakes that most often trigger these codes, with wrong and right JSON side by side, plus a function to validate the body before sending.
What Meta says about 131008 and 131009
From the official error codes table:
| Code | Official description | Guidance |
|---|---|---|
131008 | The request is missing a required parameter | Check the endpoint reference for required parameters |
131009 | One or more parameter values are invalid | Check the reference for the values each parameter accepts and, if relevant, how to add the phone number to the WhatsApp Business account |
100 | The request includes unsupported or misspelled parameters | Check parameter names, spelling and length limits |
The mention of phone numbers in the 131009 guidance points to another possible cause: using a phone number ID that doesn’t belong to the account, or that was never added to it.
All three codes come back in the send response, inside an error object. The field that solves most cases is error_data.details, which usually says which parameter failed:
{
"error": {
"message": "(#131008) Required parameter is missing",
"type": "OAuthException",
"code": 131008,
"error_data": {
"messaging_product": "whatsapp",
"details": "<description of the missing parameter>"
},
"fbtrace_id": "AbC123xYz..."
}
}
The exact message and details text varies. Log both, along with fbtrace_id. Error 100 gets its own article in this series: error 100 (Invalid parameter).
Required fields for every send
The sending messages page defines the base of every request:
messaging_product: always"whatsapp".to: the recipient’s number. The docs also allow sending to a BSUID (business-scoped user ID) through therecipientfield; if both are missing, the request fails with error 100, not 131008.type: the message type. An object with the same name as the type is also required, holding the content.recipient_type:individualfor 1:1 messages orgroupfor groups.messaging_account_id: only when your token has access to more than one messaging account on that number, a situation tied to the split between the WhatsApp account and the messaging account.
Want to try it while you read? Create a Vectalk account and send your first message through the official API. Create free account →
Wrong vs. right JSON examples
1. Missing message object
{
"messaging_product": "whatsapp",
"to": "+15551234567",
"type": "text"
}
type is text, but there’s no text object. Correct:
{
"messaging_product": "whatsapp",
"to": "+15551234567",
"type": "text",
"text": { "body": "Your order 8812 is out for delivery." }
}
2. A number format that changes the destination
Meta recommends sending to with the plus sign and the country code. Without the +, your business number’s country code is prepended, which can send the message to the wrong number or not deliver it at all. The docs add that for Brazil and Mexico the prefix may be adjusted by the Cloud API, and that this is standard behavior.
Value in to | Risk |
|---|---|
"+15551234567" | Recommended format |
"15551234567" | Has the country code but no +, which Meta recommends including |
"(555) 123-4567" | No country code: your number’s code gets prepended |
"1 (555) 123-4567" without + | Your country code may be prepended before the 1 |
Normalize every number to international format, with country code, when you store it, not at send time. The Vectalk documentation examples use the full number without the + (such as 5511999999999); what must never be missing is the country code.
3. Template without a language
{
"messaging_product": "whatsapp",
"to": "+15551234567",
"type": "template",
"template": { "name": "order_confirmed" }
}
template.language.code is required. Correct:
{
"messaging_product": "whatsapp",
"to": "+15551234567",
"type": "template",
"template": {
"name": "order_confirmed",
"language": { "code": "en_US" }
}
}
If the language is present but the template doesn’t exist in it (for example en-US with a hyphen instead of en_US), you’ll usually get a different code: error 132001.
4. components with the wrong structure
The most common mistake in templates with variables is sending parameters outside components, or with the wrong parameter type:
{
"template": {
"name": "order_confirmed",
"language": { "code": "en_US" },
"parameters": ["Maria", "8812"]
}
}
Correct: each part of the template (header, body, button) is an item in components, and each variable is an object with a type and its value.
{
"messaging_product": "whatsapp",
"to": "+15551234567",
"type": "template",
"template": {
"name": "order_confirmed",
"language": { "code": "en_US" },
"components": [
{
"type": "body",
"parameters": [
{ "type": "text", "text": "Maria" },
{ "type": "text", "text": "8812" }
]
}
]
}
}
5. Dynamic button without sub_type and index
Templates with a dynamic URL button must say which button gets the value:
{
"type": "button",
"parameters": [{ "type": "text", "text": "8812" }]
}
Correct:
{
"type": "button",
"sub_type": "url",
"index": "0",
"parameters": [{ "type": "text", "text": "8812" }]
}
6. Variable count or format doesn’t match the template
This isn’t 131008 or 131009, but it shows up at the same stage of development. If the template has two body variables and you send one, the error is 132000 (number of parameters doesn’t match the template). If you send text where the header expects an image, it’s 132012 (parameter values formatted incorrectly). See errors 132012 and 132018.
Validate the payload before sending
A validation step in your code catches most of these mistakes before the call, with a clearer message than the API’s:
import re
TYPES = {"text", "image", "video", "audio", "document", "sticker",
"location", "contacts", "reaction", "interactive", "template"}
E164 = re.compile(r"^\+?[1-9]\d{9,14}$") # country code + number
def validate(payload):
errors = []
if payload.get("messaging_product") != "whatsapp":
errors.append("messaging_product must be 'whatsapp'")
if "to" not in payload and "recipient" not in payload:
errors.append("missing 'to' (or 'recipient')")
elif "to" in payload and not E164.match(payload["to"]):
errors.append(f"'to' has no country code or extra characters: {payload['to']}")
kind = payload.get("type")
if kind not in TYPES:
errors.append(f"invalid type: {kind}")
elif kind not in payload:
errors.append(f"missing '{kind}' object")
if kind == "text" and not payload.get("text", {}).get("body"):
errors.append("text.body is required")
if kind == "template":
t = payload.get("template", {})
if not t.get("name"):
errors.append("template.name is required")
if not t.get("language", {}).get("code"):
errors.append("template.language.code is required")
for c in t.get("components", []):
if c.get("type") == "button" and ("sub_type" not in c or "index" not in c):
errors.append("button component needs sub_type and index")
for p in c.get("parameters", []):
if "type" not in p:
errors.append(f"parameter without type in {c.get('type')}")
return errors
If the list comes back empty, send. If not, log it and skip the API call. Two ways to go further:
- Compare against the approved template. Fetch the template definition (how many body variables, whether the header is text or media, which buttons are dynamic) and check the payload against it. That also prevents 132000 and 132012.
- Test in Postman before writing code. Building the JSON by hand and reading the response separates payload problems from code problems. See how to test the WhatsApp API in Postman.
Full JSON for templates with header media and buttons is in how to send a template via the WhatsApp API.
Retrying won’t fix it
Parameter errors are deterministic: the same payload fails every time. Put 131008, 131009 and 100 on your worker’s “don’t resend” list and route the job to review. Retry with backoff is for transient failures such as 131016, not for these. The full list of codes and what to do for each is in WhatsApp API error codes.
Errors 131008 and 131009 with Vectalk
Vectalk is a proxy for the official Cloud API: you send with POST https://apis.vectalk.com.br/api/messages using Meta’s body format, so the parameter rules are the same. One difference is the sending number: with an instance token, Vectalk resolves the number automatically and you don’t pass phone_number_id; with an organization token, it’s required in the body, according to the send documentation. If it’s missing or doesn’t belong to the organization, the issue is that field, not the message content.
The send template page has components examples with body variables, a header image and a dynamic button, which make a good reference for your validation. Vectalk’s own authentication errors are different (401 and 403) and are described in Authentication.
To get started, read the official WhatsApp API guide or create an account at apps.vectalk.com.br/register.
Frequently asked questions
What’s the difference between error 131008 and 131009?
131008 means a required parameter is missing. 131009 means the parameter is there, but its value isn’t accepted. In both cases, error_data.details usually points to the field.
Why do I get error 100 instead of 131008 when “to” is missing?
Because that’s how the sending documentation defines it: a request with neither to nor recipient fails with code 100.
Do I need to include “+” in the phone number?
Meta recommends the plus sign and the country code. Without the +, your business number’s country code is prepended, which can route the message to the wrong number.
Can I retry automatically?
It won’t help. The same payload will fail again. Fix the JSON and send it again.
Am I charged for a message that fails with 131008 or 131009?
No. Meta charges for delivered messages, and a request rejected for a parameter error is never sent.
Official sources checked on November 10, 2026: Cloud API error codes, Sending messages, Pricing, Vectalk docs: Send message, Vectalk docs: Send template, Vectalk docs: Authentication.
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.
