Docs

Developers

Errors

Ospree uses standard HTTP status codes. 2xx is success, 4xx means the request could not be accepted as sent, and 5xx is a server error.

Where an error carries a machine-readable error_code, switch on it — not on the message text, which may change. Codes are stable: once a code ships it is never renamed or removed. Not every error carries one yet; where error_code is absent, rely on the HTTP status.

Error response shapes

4xx — client errors (ApiFailResponse). error_code is present only when the error has one:

JSON · Sample data

{
"status": "fail",
"message": "You do not have access to this.",
"data": null,
"error_code": "auth.forbidden"
}

5xx — server errors (ApiErrorResponse). Internal detail is never included. The error_code is internal_error, except for the two provider-key codes listed under Provider keys (BYOK) below:

JSON · Sample data

{
"status": "error",
"code": 500,
"message": "Something went wrong.",
"error_code": "internal_error",
"data": null
}

422 — request validation errors carry a data array, one entry per field, and no error_code:

JSON · Sample data

{
"status": "fail",
"message": "Validation error",
"data": [
{ "loc": ["body", "amount"], "msg": "Field required", "type": "missing" }
]
}

HTTP status conventions

Status

Meaning

400

The request could not be accepted — a missing or invalid parameter, or a record that does not exist.

401

Authentication required — missing, invalid, expired, or revoked credentials.

402

Payment required — the credential is valid but your plan does not include this feature.

403

Authenticated, but not permitted — for example, the API Key lacks a required Scope.

404

Resource not found.

409

Conflict with the current state of the resource.

422

The request is well-formed but cannot be processed (field validation, or a business rule).

424

Your own provider key (BYOK) was refused by the Analytics provider. See Provider keys (BYOK) below.

429

Too many requests. Wait the number of seconds in the Retry-After header, then retry.

503

Service unavailable — for example, screening on your own provider key is paused by Ospree.

5xx

Server error — internal_error, never leaks detail, except 503 provider_key.byok_paused and provider_key.not_configured.

Credential errors are deliberately uniform. Invalid, expired and revoked credentials all return the same code and message, so a response never reveals whether an account or key exists.

Error codes

Authentication & access

Code

HTTP

Message

When

auth.unauthenticated

401

Authentication required.

No credential, or it is invalid, expired or revoked.

auth.forbidden

403

You do not have access to this.

Authenticated, but not permitted to do this.

billing.payment_required

402

Payment required.

The credential is valid but your plan does not include this.

auth.insufficient_scope

403

This API key does not have the <scope> scope. Create a key that has it.

The API Key lacks a Scope the endpoint requires. data.required_scopes lists them. See Authentication.

Accounts & VASPs (Directory API)

Code

HTTP

Message

When

account.not_found

400

Account not found.

No account with that reference_id in your business.

account.reference_conflict

422

An account with that reference already exists.

Creating or renaming an account to a reference_id you already use.

vasp.not_found

404

VASP not found.

No VASP with that identifier.

Travel Rule transfers

A transfer is refused with 422 when the protocol it names cannot carry it for your business. The message is a sentence saying what to do; switch on the code.

Code

HTTP

When

protocol.not_enabled

422

The protocol is not enabled for your business.

protocol.not_provisioned

422

The protocol is enabled but not yet set up for your business.

protocol.counterparty_not_enrolled

422

The counterparty VASP is not reachable on this protocol.

protocol.send_not_implemented

422

Sending on this protocol is not available.

protocol.signing_key_missing

422

The signing key this protocol needs is not configured.

protocol.trust_anchors_invalid

422

The protocol’s trust configuration is invalid.

transfer.not_found

404

No transfer with that ID in your business.

travel_address.not_found

404

The Travel Address could not be resolved.

A transfer your plan does not cover is refused with 402 and no error_code. For example: “At least one of the VASPs must be an Ospree customer.” or “Originator VASP must be an Ospree customer for the selected travel rule protocol.”

Addresses (Address API)

Code

HTTP

Message

When

address.format_invalid

400

Invalid address format.

The wallet address is not valid for the chain.

address.checksum_invalid

400

Address checksum doesn’t match. Check it for a typo.

An Ethereum address with a wrong mixed-case checksum.

chain.not_found

404

Chain not found.

The chain name is not supported.

provider.not_found

404

Provider not found.

The named Analytics provider does not exist.

Provider keys (BYOK)

These apply only when you screen an address with your own Analytics provider key (bring your own key).

Code

HTTP

Message (example)

When

provider_key.rejected

424

TRM Labs rejected your own API key.

The provider rejected your key.

provider_key.not_entitled

424

Your own TRM Labs plan does not cover bitcoin.

Your plan with the provider does not cover the chain.

provider_key.rate_limited

424

TRM Labs rate-limited your own API key. Try again later.

The provider rate-limited your key. A Retry-After header comes with it.

provider_key.tenant_required

402

Screens on TRM Labs need your own API key. Ospree’s key is not part of your plan.

Your plan needs your own key for this provider, and none is connected.

provider_key.byok_paused

503

Screening on your own TRM Labs key is paused by Ospree. Contact Ospree support.

Ospree has paused customer keys for this provider. Your key is kept.

provider_key.not_configured

503

The screening provider is not configured. Contact Ospree support.

Ospree’s own key for the provider is not configured.

Webhooks (Webhooks API)

Code

HTTP

Message

When

webhook_config.not_found

404

Webhook config not found: <id>

No webhook endpoint with that ID in your business.

webhook_request.not_found

404

Webhook request not found: <id>

No webhook request with that ID.

webhook_secret.no_pending

409

There is no new signing secret to activate. Rotate the secret first.

Activating a signing secret before rotating it.

webhook_secret.pending_expired

409

The new signing secret has expired. Rotate the secret again.

Activating a new signing secret after its window closed.

Other codes

Code

HTTP

Message

When

link.invalid

400

This link is invalid or has expired.

A link (for example a wallet-control verification link) cannot be used.

request.cannot_complete

400

This cannot be completed.

The request is refused without a reason, to protect other data.

Every 404 for a missing resource carries an error_code of the form <entity>.not_found, such as vasp.not_found or partner_network.not_found.

Server

Code

HTTP

Message

When

internal_error

5xx

Something went wrong.

Any unexpected server error. Detail is logged, never returned.

Other errors return the HTTP status and a message without an error_code. This includes 422 validation errors and 429 rate limits. New codes are added to this page as they ship.