Skip to main content
All API errors have the same shape, regardless of the resource or the endpoint. This makes your integration predictable: you parse the error response once and reuse it across the entire API.

Uniform structure

string
Stable, machine-readable code. Use it to branch your error-handling logic (do not parse the message).
string
Human-readable message. It may change over time: do not use it to make decisions in your code.
array
Present in validation errors. A list of { field, issue } that indicates which field failed and why. In the batch mode of POST /v2/debts each entry also carries the index and externalRequestId of the failing item. Malformed JSON returns [{ "field": "body", "issue": "Invalid JSON syntax" }].
string
Unique identifier of the request. Share it with support to trace exactly what happened.

Catalog of codes

RESOLUTION_ERROR without companyCode indicates that the organization associated with your token is not properly configured in the system. If you see it persistently, contact support with the requestId.

API Gateway errors (401 and 403)

401 and 403 are issued by the API Gateway, before the request reaches the API, and do not use the uniform structure: they carry no error object and no requestId.
In the permission 403 the field is capitalized (Message). If your code reads the error, handle both shapes: the API’s error envelope and the gateway’s plain object. More detail in Authentication.

The message is informational

The text of error.message is useful for debugging, but it is not a contract: it can change without notice. To decide what to do, use error.code and, on validation errors, error.details[].field. The message examples in these guides are illustrative.

Recommendations

Branch by code

Decide your logic with error.code, never with the text of message.

Save the requestId

Log the requestId in your logs: it is the fastest way for support to trace a request.

Retry with idempotency

On 429 or 500, retry with the same Idempotency-Key to avoid duplicates.

Validate before sending

Use error.details to show your users which field to fix on 400 errors.