API Error: Request failed schema validation (must NOT have additional properties / Additional properties are not allowed)
The JSON body doesn’t match the endpoint’s schema — an unknown property, wrong nesting, or a missing required object.
Meaning
Many APIs validate bodies against a JSON Schema or OpenAPI definition. Ajv reports “must NOT have additional properties” or “must have required property 'x'”, Python jsonschema “Additional properties are not allowed ('x' was unexpected)”, OpenAPI validators “request.body should have required property”.
Strict schemas reject extra fields, so a typo in a field name or a field from a newer API version fails even though everything else is right.
Common causes
- Unknown or misspelled property in the body
- Object nested at the wrong level (flat vs wrapped in "data")
- Required sub-object or array item missing
- Sending a field that only exists in another API version
⚡ Quick fix
- Validate the payload against the published schema/OpenAPI file
- Remove fields the schema doesn’t define
- Check nesting against a docs example
Detailed fix by platform
Node.js
- javascript
import Ajv from 'ajv'; const validate = new Ajv({ allErrors: true }).compile(schema); if (!validate(body)) console.log(validate.errors);
Python
- python
from jsonschema import validate validate(instance=payload, schema=schema) # raises with the exact path
How to diagnose
- Path — Which instancePath / field does the error point to?
- Schema — additionalProperties, required, nesting
- Version — Is the schema for your API version?
🧠 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.
Report a correction or suggest an improvement
Last updated 7 Oct 2026