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.
Debug HTTP 400 responses from cURL by checking JSON syntax, Content-Type, required headers, authentication, query parameters, and request body shape.
Try 400 Debug ConversionBad Request usually means the server rejected request syntax or validation: malformed JSON, missing fields, wrong data types, invalid query values, or unsupported content type.
Parsing the cURL command makes headers, body, cookies, and auth visible so it is easier to compare the request against API documentation.
Confirm the URL, method, Content-Type, Authorization header, JSON validity, required fields, and whether browser-copied cookies are actually needed.
curl -X POST https://api.example.com/users -H 'Content-Type: application/json' --data-raw '{"email":"not-an-email","age":"wrong-type"}'
Usually no. It usually means the server received the request but rejected its format or values.
Environment-specific auth, required headers, API version, JSON field names, or copied shell quoting often differ from documentation examples.