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

# Errors

> Prizerail API error codes and what to do about each one.

Errors are JSON with an `error` code and a readable `detail`:

```json theme={null}
{ "error": "bad_request", "detail": "Expected exactly 3 winners, got 2." }
```

| Status | Code | Meaning |
| - | - | - |
| 400 | `bad_request` | The request is wrong: not JSON, the wrong number of winners, a repeated winner, a bad name or avatar, or an unknown status filter. |
| 401 | `unauthorized` | No key, or an unknown or revoked one. |
| 404 | `not_found` | No such campaign, drawing or guarantee under your account. |
| 409 | `locked` | The cutoff has passed and this list differs from the locked one. |
| 409 | `pull_campaign` | Prizerail fetches this campaign's winners from your URL. |
| 409 | `campaign_ended` | The campaign has ended and takes no more winners. |
| 400 or 409 | `rejected` | The guarantee pick isn't allowed. See [Guarantees](/api/guarantees). |

The `detail` is written for people, so it's fine to log or show to your team. Match on `error`, which won't change.


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