Skip to main content
apiguide.dev

HTTP 400 — Bad Request

The server cannot process the request due to client error (e.g., malformed syntax, invalid framing).

Status CodeHTTP 400
CategoryClient Error (4xx)
API Error Subtypes2 error schemas
HTTP Headers1 header

What does HTTP status code 400 mean?

The 400 Bad Request status code indicates that the server is unable to understand or process the request due to structural client errors (e.g., parsing errors, malformed headers, or bad syntax).

When to use it in APIs

Use 400 when the request body is syntactically invalid (e.g., malformed JSON) or when dynamic structural constraints fail before domain validation begins (like invalid cursor formats).

How it compares to other codes

  • 422 Unprocessable Entity: Use 422 for semantically valid JSON payloads that fail business validation. Use 400 for payloads that cannot even be parsed.

Specific API Error Types for 400

Associated HTTP Headers

Related HTTP Status Codes