What 400 means
A catch-all for invalid requests: broken JSON, missing required parameters, wrong types or a malformed header. The response body usually says what's wrong.
Common causes
- Invalid JSON in the body (a trailing comma, single quotes).
- A missing or misspelled required parameter.
- A wrong Content-Type, e.g. sending JSON without Content-Type: application/json.
How to fix it
If you're calling an API
- Read the error message in the response body; most APIs say exactly which field is wrong.
- Validate your JSON (our JSON formatter shows the exact error position).
- Compare your request with the API's documented example.
If you run the server
- Return a clear, machine-readable error body (e.g. RFC 9457 problem details) naming the bad field.
Should you retry?
No: fix the request first, or it will fail the same way.
Example response
HTTP/1.1 400 Bad Request
Content-Type: application/problem+json
{
"type": "about:blank",
"title": "Bad Request",
"status": 400,
"detail": "The server can't process the request because something in it is malformed."
}Defined in: RFC 9110 (HTTP Semantics). 400 is a client error: change the request before retrying.
Debugging an API call? Convert your request with the cURL converter, check the response with the JSON formatter, or see whether the API is down on its status page.