bad_request

HTTP 400 — The request was malformed.

Returned as application/problem+json with code bad_request and HTTP status 400.

The request couldn’t be parsed at all — its body, headers, or query string were malformed. This is distinct from validation_error, where the request parses but a field is invalid.

Common causes

  • The request body is not valid JSON.
  • A query parameter is malformed and cannot be parsed.
  • The request is structurally broken in a way the schema cannot accept.

How to resolve

  • Verify the body is valid JSON and Content-Type: application/json is set.
  • Check query-parameter formats against the API Reference.

Example

1{
2 "type": "https://docs.usglobalmail.com/api/problems/bad_request",
3 "title": "The request was malformed.",
4 "status": 400,
5 "code": "bad_request",
6 "request_id": "req_8f3c2a1b9d",
7 "instance": "/v1/mails"
8}
Retrying without changing the request will not help — fix the request first.