4xx Client error

HTTP 422 Unprocessable Content

The request is well formed but contains semantic errors, such as failed validation.

422 Unprocessable Content means the request is well formed but its content is not valid: the JSON parses, but the values break the server's rules.

HTTP/1.1 422 Unprocessable Content

Common causes

  • A required field is missing or empty, or a value has the wrong format, such as an invalid email.
  • Business rule violations such as an end date before the start date.
  • Frameworks such as Rails, Laravel and FastAPI use 422 for validation errors.

How to fix it

  • Read the response body: it usually lists each invalid field.
  • Validate the input against the API's schema before sending it.

Related status codes

Other status codes

1xx Informational

2xx Success

3xx Redirection

5xx Server error

Search all HTTP status codes