HTTP status codes / 4xx — Client errors
400 Bad Request
The server could not parse or accept the request as sent.
What it means
The generic client error: malformed JSON, invalid parameters, missing required fields, broken encoding or headers. The response body usually (and should) explain what exactly was wrong.
Common causes
- Malformed JSON body (trailing comma, unquoted key, wrong encoding)
- Missing or wrong Content-Type header
- Invalid query parameter type or missing required field
- Header values with illegal characters
Reproduce it in cURL
curl -i -X POST -H "Content-Type: application/json" -d '{broken json' https://httpbin.org/post Same request, no terminal: paste this into the cURL converter for native code, or straight into ReqPad on your phone.
How to debug it
Reproduce the request in an API client and inspect the body the server returns — then validate your JSON syntax, Content-Type header and parameter types one by one.
Server-side note: Return (and read) a body that names the offending field — a bare 400 wastes everyone's day.
The fastest way to pin down a 400 is to reproduce the exact request and inspect what actually went over the wire — status, headers, timing and body, without your app code in the way. That is what an API client is for; ReqPad does it from your phone, with every request saved to history.
Related codes
401 Unauthorized · 402 Payment Required · 403 Forbidden · 404 Not Found · 405 Method Not Allowed · 406 Not Acceptable — or the full reference.
Reproduce that 400 in 10 seconds.
Build the request, send it, read status + headers + timing — on your iPhone. Free to start.