invalid_request: The request failed validation

The body or the parameters did not match the route's schema. Nothing was done.

A body the server refuses before any route runs (JSON that does not parse, an empty JSON body, a wrong media type, or a body that is too large) carries the same code with param body, under the HTTP status the server chose for it (a 4xx, not always 400).

What to do

On the wire

HTTP 400, error type invalid_request_error. The body depends on the surface:

The detailed owner API body:

{
  "error": "invalid … (fail closed)",
  "errorDetail": {
    "type": "invalid_request_error",
    "code": "invalid_request",
    "message": "…",
    "param": "capUnits",
    "doc_url": "…/errors/invalid_request.md",
    "fix": "the request body or parameters failed validation; see param"
  }
}

See all error codes.