HTTP status codes / 4xx — Client error

422 Unprocessable Content

What it means

The request is syntactically fine — valid JSON, correct content-type — but semantically wrong: validation failed.

What causes it

Required fields missing, values out of range, business rules violated. Rails and many REST APIs use 422 for all validation errors.

How to fix it

Read the response body — well-behaved APIs enumerate exactly which fields failed and why.