Guides
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
{
"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" }
}
}| Field | Description |
|---|---|
code | Stable code to handle in your program |
message | Human-readable description; do not parse it |
details | Extra 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:.
{
"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-code | Meaning |
|---|---|
REQUIRED | Required field missing |
INVALID_UUID | Not a UUID (including path ids) |
INVALID_ENUM | Value outside the enum, e.g. 'WIRE' is not a valid rail |
INVALID_DATE | Date in the wrong format |
INVALID_TYPE | Wrong type |
INVALID_AMOUNT_PRECISION | Too many decimal places for the asset |
AMOUNT_MUST_BE_POSITIVE | Zero amount |
VALIDATE_IDENTIFICATION_DOCUMENT | CPF 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
| Status | When |
|---|---|
200, 201, 202, 204 | Success |
400 | Malformed or invalid request |
401 | Missing, invalid or expired token |
404 | Resource does not exist, or belongs to another customer |
405 | Method not supported on the path (METHOD_NOT_ALLOWED) |
409 | Idempotency or state conflict |
422 | Valid syntax, but a business rule was violated |
429 | Rate limit (in Mimicr, only with chaos) |
500, 503 | Server failure (in Mimicr, only with chaos) |
Frequent codes
code | Status | Description |
|---|---|---|
INVALID_ACCESS_TOKEN | 401 | Missing, malformed or forged token |
EXPIRED_ACCESS_TOKEN | 401 | Expired token |
MISSING_REQUIRED_HEADER | 400 | X-Idempotency-Key missing |
INVALID_FILTER_FORMAT | 400 | Malformed filters |
UNSUPPORTED_ASSET | 400 | Unknown asset |
RESOURCE_NOT_FOUND | 404 | Unknown resource |
IDEMPOTENCY_CONFLICT | 409 | Key already used with a different request |
REVIEW_ALREADY_SUBMITTED | 409 | Account already under review |
BENEFICIARY_ANALYSIS_NOT_READY | 409 | Attestation uploaded before it was requested |
ACCOUNT_NOT_MODIFIABLE | 422 | Account not in ACTION_REQUIRED |
MISSING_DOCUMENTS_FOR_REVIEW | 422 | Documents missing for review |
QUOTE_EXPIRED | 422 | Quote expired |
QUOTE_ALREADY_CONSUMED | 422 | Quote already used |
PAYMENT_INSTRUCTION_NOT_APPROVED | 422 | Instruction not approved |
OPERATION_NOT_REFUNDABLE | 422 | Refund 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:
"currentState": {
"status": "FAILED",
"reason": { "code": "PROCESSING_ERROR", "message": "Transaction processing failed.", "details": {} },
"createdAt": "2026-11-05T20:12:20Z"
}reason.code | Where |
|---|---|
PROCESSING_ERROR | Withdrawal refused by the rail |
INSUFFICIENT_BALANCE | Short balance when a withdrawal, swap or transfer is processed |
QR_CODE_EXPIRED | Deposit QR expired unpaid (code chosen by Mimicr) |
COMPLIANCE_REJECTED | Payment instruction rejected |
WALLET_SCREENING_REJECTED | Crypto wallet rejected (code chosen by Mimicr) |
DOCUMENT_REQUIRED | Operation or instruction in ACTION_REQUIRED (code chosen by Mimicr) |
When to retry
| Status | Retry? | How |
|---|---|---|
400, 401, 404, 422 | No | Fix the request (or renew the token on 401) |
409 | Depends | Check whether the original call succeeded |
429 | Yes | Wait and try again |
500, 503 | Yes | Exponential 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.