> ## Documentation Index
> Fetch the complete documentation index at: https://docs.artery.money/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors

> How the Artery API reports errors.

> [!NOTE]
>
> The Artery API is in draft and may change before launch. Build against the sandbox, and check back here for changes.

Errors return an HTTP status and a JSON body:

```json theme={null}
{
  "statusCode": 400,
  "message": "AMOUNT_EXCEEDS_LIMIT",
  "error": "Bad Request"
}
```

When a request is refused, nothing is created: no PIN, no reservation, no withdrawal.

## Status codes

| Status | Meaning |
| - | - |
| 400 | The request is invalid. `message` says what's wrong. |
| 401 | The API key is missing, malformed, unknown, expired, or for the other environment. |
| 403 | The key lacks the scope, or the request came from an address not on its IP allowlist. |
| 404 | No such record on your account. |
| 429 | Too many requests. Slow down and retry. |

## Common messages

| `message` | Meaning |
| - | - |
| `INVALID_AMOUNT` | `amount_cents` isn't a positive whole number. |
| `AMOUNT_EXCEEDS_LIMIT` | The amount is above the per-PIN limit. |
| `INVALID_COLLECTION_ID` | The `collection_id` isn't a valid id. |
| `IP not allowed` | The request came from an address not on the key's allowlist. |

## Withdrawal failures

A withdrawal that fails after it was accepted shows `status: FAILED` and a `failureReason`, and you receive `withdrawal.failed`. The reserved total goes back to Available. See [Withdraw to a wallet](https://docs.artery.money/api-reference/withdrawals/withdraw-to-a-wallet.md) for the list of reasons.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.