> ## 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.

# Authentication

> Authenticate Prizerail API requests with your campaign's bearer key.

Every API request goes to `https://www.prizerail.com/api/v1` and carries your key as a bearer token:

```http theme={null}
Authorization: Bearer pr_prod_…
```

* **Owners create keys** in the partner portal under **Team → API keys**. A key is shown once, when it's made.
* **One key covers every campaign** of yours.
* **Environments are separate.** Keys starting `pr_test_` only work in our test environment, and `pr_prod_` keys only in production.
* **Revoking is immediate.** Every request with a revoked key fails from then on. To rotate, create the new key, deploy it, then revoke the old one.

A missing, unknown or revoked key returns:

```json theme={null}
401 { "error": "unauthorized", "detail": "Unknown or revoked API key." }
```

A campaign that belongs to another account returns `404 not_found`, the same as one that doesn't exist.


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