Skip to content

INVALID_REQUEST

The request was malformed: a field is missing, has the wrong type or format, or the values contradict each other (for example from and to naming the same asset).

HTTP status
400 Bad Request
Code
INVALID_REQUEST

Every endpoint validates its body, query and path against the schema in /v0/openapi.json before it does anything, so nothing was created, quoted or charged. details.field names the first offending field, and details.issues lists every problem the validator found.

{
"error": {
"code": "INVALID_REQUEST",
"message": "Request validation failed",
"details": { "field": "amount", "issues": [{ "path": ["amount"], "message": "Required" }] }
}
}

A protocol that rejects the request’s values during a quote can also report this code, for that protocol only, in the quote response’s errors.

  • Fix the field details.field names and send the request again. The message is written for a person, so it is safe to log.
  • Amounts are integer strings in base units ("1000000" for 1 USDC), never decimals or numbers.
  • Build requests with @intents-fi/sdk, whose types are generated from the same OpenAPI document, and most of these never reach the API.
{ "error": { "code": "INVALID_REQUEST", "message": "…" } }