Example

HTTP 400 Bad Request cURL Examples

Debug HTTP 400 responses from cURL by checking JSON syntax, Content-Type, required headers, authentication, query parameters, and request body shape.

Try 400 Debug Conversion

Common 400 causes

Bad Request usually means the server rejected request syntax or validation: malformed JSON, missing fields, wrong data types, invalid query values, or unsupported content type.

How conversion helps

Parsing the cURL command makes headers, body, cookies, and auth visible so it is easier to compare the request against API documentation.

What to check first

Confirm the URL, method, Content-Type, Authorization header, JSON validity, required fields, and whether browser-copied cookies are actually needed.

HTTP 400 debug input

curl -X POST https://api.example.com/users -H 'Content-Type: application/json' --data-raw '{"email":"not-an-email","age":"wrong-type"}'

FAQ

Does HTTP 400 mean the server is down?

Usually no. It usually means the server received the request but rejected its format or values.

Why does the same cURL work in docs but fail for me?

Environment-specific auth, required headers, API version, JSON field names, or copied shell quoting often differ from documentation examples.