4xx Client Error

HTTP 400 Bad Request

The server cannot process the request due to something perceived to be a client error — malformed syntax, invalid request framing, or deceptive request routing.

Common Causes

  • Malformed JSON or XML in the request body
  • Missing required request parameters
  • Invalid URL encoding or special characters
  • Request body exceeds expected schema

How to Fix

  1. 1Validate request body format (JSON, XML) before sending
  2. 2Check all required parameters are included
  3. 3Verify URL encoding is correct
  4. 4Compare your request against the API documentation

Example

HTTP 400 Bad Request
POST /api/users HTTP/1.1
{ "name": }  ← invalid JSON

→ 400 Bad Request
→ "Unexpected token } in JSON"

Related Client Error Codes