Skip to content

Engineering

WhatsApp error 131008 (required parameter is missing): find the field your request left out

A field-by-field checklist for 131008: messaging_product, to, type, the message object, template language and media headers, with a broken and a corrected request and a validation habit that stops it reaching Meta.

By Broadchat teamPublished 6 min read

In short

WhatsApp error 131008 means the request you sent to the Cloud API did not include a field that the endpoint requires; Meta's description is "The request is missing a required parameter." The `error_data.details` text usually names the field. The usual suspects on `/messages` are `messaging_product`, `to`, the object matching `type` (such as `text` or `template`), the template `language`, and the media object of a template header. Add the field, send again, and validate payloads before they leave your server so it does not recur.

Key takeaways

  • Meta's description of 131008 is "The request is missing a required parameter"; its fix is to check the endpoint's reference for required fields.
  • Read error_data.details first: it usually names the missing field, which saves guessing.
  • On /messages the common gaps are messaging_product, to, the object named by type, template.language and header media.
  • 131008 is returned before anything is sent, so the message was not delivered or charged and a corrected retry cannot duplicate it.
  • A missing field and a wrong value are different errors: 131008 for missing, 131009 for invalid.

WhatsApp error 131008 tells you that your request was incomplete. Meta's error codes page describes it as "The request is missing a required parameter" and the listed solution is to "See the endpoint's reference to determine which parameters are required." It is always something in your own request body, so it is one of the quickest errors to fix once you know which field is gone. The message was rejected before sending, so the customer received nothing and nothing was charged.

Where it comes from

Every Cloud API endpoint has required parameters. For sending, the endpoint is POST /{phone-number-id}/messages, and a valid body needs at least messaging_product set to whatsapp, the recipient in to, a type, and an object whose key matches that type. A template message also needs a name and a language with a code. When any of these is absent, Meta stops before checking anything else and returns 131008.

The same code appears on other endpoints too, for example uploading media without messaging_product, or registering a phone number without the pin. The pattern is the same: a field the endpoint insists on was not there.

The fields most often missing

FieldWhy it goes missingWhat it should look like
messaging_productCopied from an old example or left out of a helper function"messaging_product": "whatsapp"
toContact had no phone number, or the mapping from a CRM column was emptyFull number with country code, e.g. 919876543210
Object named by typetype is text but the body is sent as message or under another key"type": "text", "text": { "body": "..." }
text.bodyEmpty string from a template engine or a failed variable mergeA non-empty string
template.languageOnly the template name was passed"language": { "code": "en" }
Header mediaTemplate has an image or document header but no header component was sentA header component with an image or document parameter (an id or link)
Interactive actionA button or list message built without its action blockaction.buttons or action.sections

A missing template body variable is a slightly different case. When the number of parameters does not match the template, Meta usually returns 132000 instead. Our guide to sending a template message through the API shows how the components fit together.

What the error looks like

The response comes back immediately. Values and wording illustrative:

{
  "error": {
    "message": "(#131008) Required parameter is missing",
    "type": "OAuthException",
    "code": 131008,
    "error_data": {
      "messaging_product": "whatsapp",
      "details": "Parameter 'language' is required."
    },
    "fbtrace_id": "AqZ71bN0cRk3xTyLv5Hm2pW"
  }
}

The details string is the useful part. Log it with the request body (with personal data masked) so the developer sees both together.

Step-by-step fix

  1. Read error_data.details. In most cases it names the field. If it does not, compare your body with the endpoint reference line by line.
  2. Print the exact JSON you sent. Not the object before serialisation: the final string. Fields set to undefined in JavaScript vanish from JSON.stringify, which is a frequent cause.
  3. Check the top level first: messaging_product, to, type.
  4. Check that the object key matches type. type: "image" needs an image object; type: "template" needs a template object.
  5. For templates, check name and language.code, then check that every component the template defines (header media, body variables, dynamic button URLs) is present.
  6. Send again. Nothing was delivered the first time, so there is no risk of a duplicate.

Here is a template request that failed with 131008 because the language was missing, and the corrected version:

{
  "messaging_product": "whatsapp",
  "to": "919812345678",
  "type": "template",
  "template": {
    "name": "appointment_reminder"
  }
}
{
  "messaging_product": "whatsapp",
  "to": "919812345678",
  "type": "template",
  "template": {
    "name": "appointment_reminder",
    "language": { "code": "en" },
    "components": [
      {
        "type": "body",
        "parameters": [
          { "type": "text", "text": "Arjun" },
          { "type": "text", "text": "Thu 6 Nov, 11:30 am" }
        ]
      }
    ]
  }
}

A worked example

Sunrise Clinic in Pune sends appointment reminders from its practice software through a small Node service. After a code change, every reminder for the next morning fails with 131008. The developer reads details and sees the template language is missing: a refactor renamed the config key from lang to language, so the value read from the config is undefined and JSON.stringify drops the whole field.

He fixes the key, adds a check that refuses to send a template without language.code, and resends the evening's batch. Patients get their reminders a little later than planned, and nobody gets a duplicate, because the failed calls had never been sent.

Preventing 131008

  • Validate before you call Meta. A schema (Zod, Joi, JSON Schema) for each message type you send catches empty to or missing language in your own logs instead of Meta's.
  • Never let undefined reach the payload. Default or reject missing values explicitly.
  • Keep template definitions in sync. If a template has an image header, your sender must always add the header component. Re-read the template from WhatsApp Manager when it is edited.
  • Reject contacts without a number at import time, not at send time.
  • Write one tested builder per message type instead of hand-writing JSON in many places.

How Broadchat shows 131008

Broadchat builds the request body for you from the template you pick and the variables you map, so required fields such as messaging_product, language and the header component come from the approved template itself. If Meta still rejects a send with 131008, the failed message shows the reason "A required parameter is missing." together with Meta's own text. When the missing piece is a media ID Meta no longer accepts, Broadchat uploads the file again and retries, and if that fails it sends the media by link.

For the closely related invalid-value error, see WhatsApp error 131009. The full list is in the WhatsApp API error codes cheat-sheet, and the template basics in the WhatsApp message templates guide. Agencies can give clients a no-code template sender under their own brand with the white-label program.

Sources

  1. WhatsApp error codes — Meta for Developers, checked 1 November 2026
  2. Send messages — Meta for Developers, checked 1 November 2026
  3. Send message templates — Meta for Developers, checked 1 November 2026

Broadchat team · Product and partner success team

The people who build and support Broadchat, the white-label WhatsApp Business API platform. We write from what we see while onboarding partners and their clients on the official WhatsApp Cloud API, and we check every article against Meta's current documentation.

Last updated:

Frequently asked questions

What does WhatsApp error 131008 mean?

Your API request left out a field that the endpoint requires. Meta describes it as "The request is missing a required parameter" and asks you to check the endpoint reference. The error_data.details text usually names the field.

Which parameters are required to send a WhatsApp message?

On the /messages endpoint you need messaging_product set to whatsapp, the recipient in to, a type, and an object matching that type, such as text with a body. Template messages also need the template name and language code, plus any header media the template defines.

Why do I get 131008 when the field is in my code?

Usually because its value is undefined when the request is serialised, so JSON.stringify drops it, or because it is nested under the wrong key. Log the final JSON string you send, not the object in your code.

Is 131008 the same as 131009?

No. 131008 means a required field is missing. 131009 means a field is present but its value is not valid, such as a wrong format or a value that is too long.

Am I charged for a message that fails with 131008?

No. The request is rejected before anything is sent, and Meta charges only for delivered messages. Correct the body and send again; there is no risk of a duplicate.

Launch WhatsApp under your own brand

Resell campaigns, chatbots, a shared inbox and CRM on the official WhatsApp Cloud API, with your logo, domain and prices.