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

# Public endpoints

> The public, keyless endpoints behind every campaign page and draw proof.

Everything a draw rests on is public, with no key and with CORS open, at `https://www.prizerail.com`.

## A campaign's draws

```http theme={null}
GET /campaigns/{slug}/draws.json
```

The campaign (name, status, cadence, time zone, winners per draw, payout chain and token) and its draws, newest first. Each draw has its `id`, `number`, `drawAt`, `cutoffAt`, `stage`, number of `winners`, `winnersCommitment`, `lockedAt`, `settledAt`, `paidAt` and a link to its `proof`.

| Query | Meaning |
| - | - |
| `limit` | Up to 100. Default 30. |
| `before` | A date. Pass the response's `nextBefore` to page back. |

## A draw's proof

```http theme={null}
GET /campaigns/{slug}/draws/{id}/proof.json
```

Available once a draw is drawn:

| Field | Holds |
| - | - |
| `campaign` | `id` (the contract's campaign ID), `slug` and `name`. |
| `drawing` | `id`, `number` (the contract's drawing ID) and `drawAt`. |
| `winnerList` | `winners` in order, their `commitment` and `lockedAt`. |
| `entropy` | `provider`, `requestId`, `value` and `revealedAt`. |
| `prizeTable` | `version`, `denominator` and `tiers`, top prize first, each with `amountCents`, `weight` and `threshold`. |
| `results` | Each winner's `position`, `winner`, `displayName`, `randomValue`, `roll` and `amountCents`. |

`displayName` is the partner's public name for the winner, shown only and never hashed.

## The verify script

```http theme={null}
GET /verify/verify-draw.mjs
```

See [Verify a draw](/verification/verify-a-draw).

## Stages

| `stage` | Meaning |
| - | - |
| `open` | Taking winners until `cutoffAt`. |
| `locked` | The winner list is locked and its fingerprint recorded. |
| `drawing` | The random value has been requested. |
| `drawn` | Prizes are decided and the proof is published. |
| `paid` | Prizes are sent to the partner to pay out. |

An unknown campaign returns `404`, and so does the proof of a draw that isn't drawn yet. Amounts are US cents, and times are ISO 8601 in UTC.


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