Guides
API principles

Errors

The error envelope, HTTP status codes, validation and business codes, and when to retry a call.

The API uses standard HTTP status codes and returns every error in the same envelope. Every response, success or error, carries the X-Request-Id header (UUID), useful to correlate logs.

Envelope

json
{
  "code": "RESOURCE_NOT_FOUND",
  "message": "Operation with given parameters [id:ba13b8ea-c7f0-4bab-a926-865bb2e4e5fc] not found",
  "details": {
    "resource": "Operation",
    "parameters": { "id": "ba13b8ea-c7f0-4bab-a926-865bb2e4e5fc" }
  }
}
FieldDescription
codeStable code to handle in your program
messageHuman-readable description; do not parse it
detailsExtra context, may be {}

Validation errors

Field errors come as INVALID_DATA, with the list in details.errors. field is prefixed with body:, path:, query: or header:.

json
{
  "code": "INVALID_DATA",
  "message": "Object contains invalid data",
  "details": {
    "errors": [
      { "code": "REQUIRED", "message": "Parameter 'body:quoteId' not found in request", "field": "body:quoteId", "params": {} }
    ]
  }
}
Sub-codeMeaning
REQUIREDRequired field missing
INVALID_UUIDNot a UUID (including path ids)
INVALID_ENUMValue outside the enum, e.g. 'WIRE' is not a valid rail
INVALID_DATEDate in the wrong format
INVALID_TYPEWrong type
INVALID_AMOUNT_PRECISIONToo many decimal places for the asset
AMOUNT_MUST_BE_POSITIVEZero amount
VALIDATE_IDENTIFICATION_DOCUMENTCPF or CNPJ with an invalid check digit

INVALID_DATA is usually 400. Exceptions: creating a beneficiary or an instruction answers 422, and the parameters of List operations and Get a report also answer 422.

HTTP status codes

StatusWhen
200, 201, 202, 204Success
400Malformed or invalid request
401Missing, invalid or expired token
404Resource does not exist, or belongs to another customer
405Method not supported on the path (METHOD_NOT_ALLOWED)
409Idempotency or state conflict
422Valid syntax, but a business rule was violated
429Rate limit (in Mimicr, only with chaos)
500, 503Server failure (in Mimicr, only with chaos)

Frequent codes

codeStatusDescription
INVALID_ACCESS_TOKEN401Missing, malformed or forged token
EXPIRED_ACCESS_TOKEN401Expired token
MISSING_REQUIRED_HEADER400X-Idempotency-Key missing
INVALID_FILTER_FORMAT400Malformed filters
UNSUPPORTED_ASSET400Unknown asset
RESOURCE_NOT_FOUND404Unknown resource
IDEMPOTENCY_CONFLICT409Key already used with a different request
REVIEW_ALREADY_SUBMITTED409Account already under review
BENEFICIARY_ANALYSIS_NOT_READY409Attestation uploaded before it was requested
ACCOUNT_NOT_MODIFIABLE422Account not in ACTION_REQUIRED
MISSING_DOCUMENTS_FOR_REVIEW422Documents missing for review
QUOTE_EXPIRED422Quote expired
QUOTE_ALREADY_CONSUMED422Quote already used
PAYMENT_INSTRUCTION_NOT_APPROVED422Instruction not approved
OPERATION_NOT_REFUNDABLE422Refund not allowed

Each journey guide lists the errors of its flow.

Operation failure reasons

Asynchronous failures are not HTTP errors: the call was accepted and the operation or instruction ended badly later. The reason is in currentState.reason:

json
"currentState": {
  "status": "FAILED",
  "reason": { "code": "PROCESSING_ERROR", "message": "Transaction processing failed.", "details": {} },
  "createdAt": "2026-11-05T20:12:20Z"
}
reason.codeWhere
PROCESSING_ERRORWithdrawal refused by the rail
INSUFFICIENT_BALANCEShort balance when a withdrawal, swap or transfer is processed
QR_CODE_EXPIREDDeposit QR expired unpaid (code chosen by Mimicr)
COMPLIANCE_REJECTEDPayment instruction rejected
WALLET_SCREENING_REJECTEDCrypto wallet rejected (code chosen by Mimicr)
DOCUMENT_REQUIREDOperation or instruction in ACTION_REQUIRED (code chosen by Mimicr)

When to retry

StatusRetry?How
400, 401, 404, 422NoFix the request (or renew the token on 401)
409DependsCheck whether the original call succeeded
429YesWait and try again
500, 503YesExponential backoff, with the same X-Idempotency-Key

Test it

Control API chaos injects 500 (INTERNAL_ERROR), 503 (SERVICE_UNAVAILABLE) or 429 (TOO_MANY_REQUESTS) on a percentage of calls, before or after processing, plus latency. See Sandbox control.