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

# Errors

> Status codes, error messages and what to do about them

Every error comes back in the [response envelope](https://docs.reachhunt.ai/developer-api/response-format.md) with `status` set to `false` and a message in `error`. Messages are written for people, so you can show them as they are.

```json theme={"system"}
{
  "status": false,
  "data": null,
  "error": "Add at least one lead list"
}
```

## Status codes

Errors the API handles itself come back with HTTP `200`. Read `status` on every response, not only the HTTP code.

| HTTP | When | What to do |
| - | - | - |
| `200` with `status: false` | The request was refused: a field is wrong, something wasn't found, or the action doesn't fit the item's current state | Read `error` and fix the request. Sending it again unchanged gives the same error |
| `401` | The API key is missing, not valid or was deleted | Check the `Authorization` header, or [create a new key](https://docs.reachhunt.ai/developer-api/authentication.md) |
| `402` | The workspace has no active plan, or its trial has ended | Renew the plan in ReachHunt |
| `429` | A connected account reached one of its sending limits | Wait for the limit to reset, or send from another account. See [Rate limits](https://docs.reachhunt.ai/developer-api/rate-limits.md) |
| `500` | Something failed on our side | Try again after a short wait |

## Common messages

| `error` | What it means |
| - | - |
| `API keys cannot be used for this request` | The endpoint changes access or billing, which keys can't do. See [what a key can do](https://docs.reachhunt.ai/developer-api/authentication.md#what-a-key-can-do) |
| `Your free trial has ended. Pick a plan to continue.` | Comes with `402` |
| `This workspace has no active plan. Pick a plan to continue.` | Comes with `402` |
| `limit must be a whole number from 1 to 100` | A paged list got a `limit` outside its range |
| `Conversation not found`, `Lead list not found`, `Lead not found`, `Message not found` | The ID is wrong, or it belongs to another workspace |
| `Weekly limit of 100 connection requests reached on @jane-doe` | An example of a `429`. The message names the limit and the account |

## Campaigns

### Starting a campaign

[Start campaign](https://docs.reachhunt.ai/api-reference/campaigns/start-campaign.md) checks these in order and stops at the first one that fails:

| `error` | Fix |
| - | - |
| `Add at least one lead list` | Add a lead list to the campaign's audience |
| `Write at least one message` | Add a message step to the sequence |
| `Every message step needs text` | Fill in each message step |
| `Open at least one day on the schedule` | Turn on at least one day in the sending schedule |
| `Connect an account for this campaign, or pick one that is still connected` | Pick an account whose `status` is `connected` |
| `The selected lists resolved to nobody to message` | Change the audience so it includes at least one person |

### Editing a campaign

What you can change depends on the campaign's status:

| Status | What you can change |
| - | - |
| `draft` | Everything |
| `running` or `paused` | Everything except the audience, because its people are already queued |
| `completed` or `stopped` | Only the name and description |

A change that doesn't fit the status is refused with a message that names the status, such as `A running campaign keeps the audience it started with — its people are already queued` or `A completed campaign can only be renamed`.

## Retrying

* Retry `500` errors and network failures after a short wait, and wait longer each time.
* Don't retry a `200` with `status: false`, a `401` or a `402` until you fix the cause.
* For a `429`, wait until the account's limit resets. [Get account limits](https://docs.reachhunt.ai/api-reference/accounts/get-account-limits.md) shows what is left.
* Before you retry a message that timed out, list the conversation's messages. The first attempt may have been sent.


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