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

# Quickstart

> From a winners URL to your first drawn prize in four steps.

From a winners URL to your first drawn prize, in four steps.

## 1. Get an API key

Sign in to the partner portal at [prizerail.com/login](https://www.prizerail.com/login). An owner creates keys under **Team → API keys**. The key is shown once, in a dialog, so copy it into your backend's secrets before closing it.

Keys look like `pr_prod_…` in production and `pr_test_…` in our test environment, and each only works in its own environment. One key covers every campaign of yours.

## 2. Publish your winners at a URL

For each draw, serve its winner list as JSON at a URL Prizerail can fetch, exactly as many winners as the campaign draws:

```json theme={null}
{ "winners": ["user-8231", "user-4417", "user-0092"] }
```

The URL can include placeholders that Prizerail fills in for each draw, such as `{date}` or `{drawingId}`:

```
https://api.acme.com/prizerail/{date}
```

Until your draw has happened, return `404` or an empty list. Prizerail checks every 5 minutes in the 2 hours before each cutoff, and the list locks at the cutoff.

Use opaque ids, such as your internal user id or a hash of it, never emails or usernames. Winner ids are public in each draw's proof.

## 3. Set the URL on your campaign

In the partner portal, open the campaign and put the URL in its **Winners** section. Your campaign has a slug, the last part of its page address: `https://www.prizerail.com/campaigns/acme-daily` is `acme-daily`. See [Let Prizerail fetch winners](/api/pull-winners) for every placeholder and rule.

## 4. Read the results

After the draw, each winner has a roll and a prize:

```bash theme={null}
curl https://www.prizerail.com/api/v1/campaigns/acme-daily/drawings/d7k2m9q4x1wz \
  -H "Authorization: Bearer $PRIZERAIL_KEY"
```

When `status` is `paid`, the prizes are in your wallet, ready for you to pay your winners.

<Info>
  Rather post the winners yourself before every draw? Switch the campaign to push and see [Send winners](/api/send-winners).
</Info>


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