422
4xx Client ErrorUnprocessable Entity
The request was well-formed but had semantic errors, common in form validation.
422 Unprocessable Entity means the syntax is fine - valid JSON, right Content-Type - but the data doesn't make sense to the server. It's the go-to code for validation failures: a required field is blank, an email is malformed, a value is out of range. Unlike 400, the request was parseable; it just didn't pass the rules.
What 422 looks like on the wire
POST /api/users HTTP/1.1
Host: api.example.com
Content-Type: application/json
{"email": "not-an-email"}
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json
{"errors": {"email": "is not a valid email address"}}About 4xx Client Error
The request has a problem the client needs to fix, like a bad URL, missing auth, or invalid input.
How to fix 422 Unprocessable Entity
- Read the response body - APIs usually list which fields failed.
- Fix validation issues: required fields, formats, value ranges.
- Confirm field names and types match what the API expects.
Tools that help with 422
Where it's defined
422 Unprocessable Entity is defined in RFC 9110 §15.5.21. MDN's 422 reference covers browser behavior and examples.