What it means
The server understands the content type and the syntax is valid, but it can't process what the request says, typically because it fails validation.
Compared with 400: the JSON parses fine, but the values don't make sense.
Why you're seeing it
- A required field is empty, or an email or date is in the wrong format.
- Business rules, such as an end date before the start date.
- Frameworks like Rails, Laravel and FastAPI use
422for validation errors by default.
How to fix it
- Return field-level errors that a client can show next to each input.
- On the client, validate before sending, but keep the server checks.
Example response
HTTP/1.1 422 Unprocessable Content Content-Type: application/json {"errors": {"email": ["is not a valid address"]}}