422 Unprocessable Content

noun

say it: “for-TWEN-tee-TOO un-PROS-es-uh-bul KON-tent” /ˌfɔrˌtwɛntiˈtu ʌnˈprɑsɛsəbəl ˈkɑntɛnt/

An HTTP status code meaning the request was well-formed, but its values break the rules, such as a missing field or an age under 18.

What is 422 Unprocessable Content?

422 Unprocessable Content means the JSON is well-formed but the values break the rules, like a start date after the end date. Some APIs use 400 for this instead.

In a sentence

  • “FastAPI answers 422 Unprocessable Content before the route runs when a value has the wrong type.”
  • “A body with no email got a 422 Unprocessable Content that named the missing field.”

Level: Journeyman · More REST API terms at this level

Updated