---
title: Error catalogue
description: What each status code means, and what to do about it.
---

Every failure carries a human-readable reason, but the body's shape is not
uniform across the API yet. An authentication failure answers a code and a
message:

```json
{ "code": "ER802", "message": "Authorization token not found." }
```

A validation failure answers a single `error`:

```json
{ "error": "sourceCurrency and targetCurrency must be known CAIP-19 identifiers" }
```

**Branch on the status code.** That is the part you can rely on on every
endpoint. Handle both body shapes, and treat the text as something to log
rather than to match on: it is prose and can be reworded at any time.

- **400** (Bad request) — The request itself is malformed: an unknown currency, an untradeable pair, a missing amount, an expired quote, an id that will not parse. Fix the request. Do not retry unchanged.
- **401** (Bad credential) — Either credential is missing or wrong, or a wrong username/password or email/password was sent to one of the two calls that exchange credentials for a token. Check both layers; see authentication.
- **403** (Not allowed) — Both credentials were understood, but the request is not allowed for that identity: sending x-api-key and Authorization together, switching to a business you do not represent, or pointing an order at a payment instrument that belongs to someone else. Fix the request logic. Retrying unchanged gets the same answer.
- **404** (Not found) — The resource does not exist for this caller, either because the id is wrong or because it belongs to someone else and is reported as absent rather than forbidden. Check the id. Do not retry unchanged.
- **409** (Conflict) — What you are creating already exists in a way that conflicts: today, an identifier already claimed by another account. Resolve the conflict before retrying.
- **501** (Not built yet) — The route exists but the feature behind it does not: the sell direction on payment methods, or an area such as DCA or reverification answered by a catch-all. Do not retry. Ask your account manager about the roadmap.

> **Anything else is on us**
>
> A `5xx` you do not see above means something failed on our side. Retry with
> backoff. The request itself was fine.

See [authentication](https://partner.btcdirect.eu/v3/api/authentication.md) for exactly what produces a `401`
or a `403`.
