422 Unprocessable Entity
The syntax is valid but the content fails validation — the widely used status for API field-level validation errors like a missing required field or an invalid value.
What it means
422 Unprocessable Content (originally 'Entity', WebDAV, now used broadly) means the server understood the request and its body parsed fine, but the data violates business or validation rules. It is more specific than a generic 400, so many APIs use it for validation failures with a per-field error body.
HTTP RESPONSE
HTTP/1.1 422 Unprocessable Content
Content-Type: application/problem+json
{ "title": "Validation failed", "errors": { "email": "must be a valid address" } }Why it matters
- It distinguishes malformed requests (400) from semantically invalid ones, improving client error handling.
- A structured 422 body enables precise, field-level form feedback.
Common mistakes
- Using 400 for all validation errors, losing the syntax-vs-semantics distinction.
- Returning 422 with an unstructured message clients cannot map to fields.
How WebInspect checks this
- The API Inspector evaluates status-code correctness and whether errors use a structured format like problem+json.