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

# Errors

> How the Developer API reports errors, and what each status code means.

Errors return a JSON body with `status` and `message`:

```json theme={null}
{
  "status": "DATA_NOT_FOUND",
  "message": "Contact not found"
}
```

Validation errors (`422`) also include `error`, a readable summary, and `errors`, the problem with each field:

```json theme={null}
{
  "status": "ERROR",
  "message": "Invalid Input",
  "error": "channelId is required",
  "errors": [{ "channelId": "channelId is required" }]
}
```

## Status codes

| Code | Meaning | What to do |
| - | - | - |
| `401` | The API key or secret is missing or wrong. | Check both headers. See [Authentication](https://docs.gallabox.com/api-reference/authentication.md). |
| `402` | The account is disconnected, usually because its plan has lapsed. Every call returns this until the account is active again. | Renew the plan, or contact Gallabox support. |
| `403` | The plan doesn't include the feature, or the key's permission scope doesn't allow the action. The endpoint's `403` response names which. | Upgrade the plan, or use a key with the permission. |
| `404` | The resource doesn't exist in this account. | Check the ID and the account. |
| `421` | A send was refused because of the contact's settings, for example the contact hasn't opted in and you sent `checkOptIn=true`. | Don't retry. Check the contact's opt-in. |
| `422` | The request failed validation. | Fix the fields listed in `errors`. |
| `429` | You reached a rate limit. | Wait, then retry. See [Rate limits](https://docs.gallabox.com/api-reference/rate-limits.md). |

> [!NOTE]
>
> For WhatsApp, running out of message credits doesn't return an error. The message is saved but not sent: its status becomes `error` with error code `1044`. Check it with the message status endpoint.


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