Skip to content
FX-Port/Docs
GuidesAPI referenceChangelog
Get API keys
  • Overview
  • Error object

API reference · Objects

The Error object

The body of every failed call.

Parse errors[]: each entry has a stable code, a type that tells you how to react, a human message and, when there is one, the field at fault. The older keys (detail, error, message, code) stay in the body for integrations written before errors[] existed. See the Errors guide.

Attributes

environmentstring

The environment of the key that made the call: sandbox for fxp_test_ keys, live for fxp_live_ keys. Present in every JSON body.

One of sandbox, live.

successboolean

Always false for an error.

errorsarray of object

The errors, most important first. Parse this array; the other keys are the older shapes of the same error and stay for existing integrations.

ShowHide 7 attributes
codestring

Stable, machine-readable code in snake_case. Branch on this, never on the message.

typestring

The family of the error: tells you how to react.

One of authentication_error, permission_error, validation_error, not_found, conflict, payment_error, rate_limit_error, supplier_error, internal_error.

titlestring

A short label of the error.

messagestring

A sentence for a human: what is wrong and how to fix it. Wording can change; the code does not.

fieldstringnullable

The request field the error is about, when there is one.

detailsobjectnullable

Structured extras of the error (for example available and required for an insufficient balance).

documentation_urlstring

The documentation of this error code.

metaobject

The id of the request and the HTTP status, repeated for clients that only read the body.

ShowHide 2 attributes
request_idstring

The id of the request.

statusinteger

The HTTP status code.

request_idstring

The id of the request, also in the X-Request-Id header. Quote it when you write to support.

detailobjectdeprecated

Legacy name, still accepted. Use errors instead.

The older error body (a string, an object with error and message, or a list of validation errors).

errorobjectdeprecated

Legacy name, still accepted. Use errors[].code instead.

The older error code or text.

messagestringdeprecated

Legacy name, still accepted. Use errors[].message instead.

The older error message.

codestringdeprecated

Legacy name, still accepted. Use errors[].code instead.

The older error code.

Next The Flight offer object

© 2026 FX-Port

TermsPrivacy[email protected]