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
- 1Validate request body format (JSON, XML) before sending
- 2Check all required parameters are included
- 3Verify URL encoding is correct
- 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
401
Unauthorized
402Payment Required
403Forbidden
404Not Found
405Method Not Allowed
406Not Acceptable
407Proxy Authentication Required
408Request Timeout
409Conflict
410Gone
411Length Required
412Precondition Failed
413Content Too Large
414URI Too Long
415Unsupported Media Type
416Range Not Satisfiable
417Expectation Failed
418I'm a Teapot
421Misdirected Request
422Unprocessable Content
423Locked
424Failed Dependency
425Too Early
426Upgrade Required
428Precondition Required
429Too Many Requests
431Request Header Fields Too Large
451Unavailable For Legal Reasons