API Error: Missing required parameter (parameter_missing / "x" is required)
The API rejected the request because a field it requires — in the query string, path, headers or JSON body — wasn’t sent or was empty.
Missing required parameteris a required fieldRequired parameter is missingMissing required request body Meaning
Every endpoint declares which inputs are mandatory. If one is absent, null or an empty string, the server stops before doing any work and returns a 400 (sometimes 422) naming the missing field.
The field is often there in your code but never reaches the wire: it was undefined and got dropped during JSON serialization, it was sent as a query parameter when the API expects it in the body, or a form encoding/Content-Type mismatch meant the server couldn’t read the body at all.
Common causes
- The field was left out of the request
- The value was undefined/null and silently dropped by JSON.stringify
- Sent in the wrong place (query string instead of body, or body instead of header)
- Body not parsed because Content-Type is missing or wrong
- Field name misspelled or wrong case (customerId vs customer_id)
⚡ Quick fix
- Read the error body — it usually names the missing parameter
- Log the exact request the client sends and compare it with the API docs
- Add client-side validation so required fields can’t be empty
Detailed fix by platform
Node.js
- `// undefined values vanish from JSON — check before sending const body = { email, plan }; for (const [k, v] of Object.entries(body)) if (v == null
- v === '') throw new Error(
missing ${k}); await fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body) });`
Python
- python
r = requests.post(url, json={"email": email, "plan": plan}) # json= sets Content-Type for you print(r.status_code, r.json())
curl
curl -X POST https://api.example.com/v1/users -H 'Content-Type: application/json' -d '{"email":"a@b.com","plan":"pro"}'
How to diagnose
- Error body — Which parameter does it name?
- Raw request — Is the field present in the bytes actually sent (proxy/devtools log)?
- Location — Does the docs say query, path, header or body?
- Spelling — Exact name and case match the docs?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in API
Other ways to find it
Where this error sits
Origin: Application & API. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 13 Oct 2026