400 Bad Request
Meaning
The server cannot or will not process the request due to an apparent client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
When to Use
When the request is not understood by the server due to bad syntax or is inherently impossible to satisfy.
Example
Sending an API request with malformed JSON or missing required fields results in a 400 Bad Request response indicating the client error.
When Not to Use
Do not use for server-side errors (those should be 5xx codes) or for authentication failures (use 401) or authorization issues (use 403).
Source
RFC 9110