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

# Errors

> Handle the error format and the error codes.

Every error uses the same JSON format.

```json theme={null}
{
  "error": {
    "code": "not_found",
    "message": "The requested resource was not found.",
    "request_id": "3c9a8b7d-2e1f-4a6b-9c8d-7e6f5a4b3c21"
  }
}
```

Use `code` in your logic. The `message` text can change.

| Status | Code | Action |
| - | - | - |
| 400 | `invalid_request` | Fix the request. |
| 401 | `unauthorized` | Send a valid API key. |
| 404 | `not_found` | Check the ID. |
| 429 | `rate_limited` | Wait, then send the request again. |
| 500 | `internal_error` | Send the request again later. |

If many requests return a `5xx` status, check
[status.clipstake.com](https://status.clipstake.com). It shows the current
status of each ClipStake service.

## Not found

An ID that your API key cannot read returns `404`. This includes an ID of a
brand that you are not a member of, an ID with the wrong prefix and an ID that
does not exist. The response does not tell you which one applies.

The `brand_id` filter of `GET /campaigns` works the same way. A brand ID that
your API key cannot read returns `404`, not an empty list.

## Request IDs

Each response has an `X-Request-Id` header. The error body also contains
`request_id`. Give this value to ClipStake support when you report a problem.


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