The URL
The URL can name the drawing with placeholders, filled in for each draw:
For example
https://api.acme.com/prizerail/{drawingId}.
The URL must be https on a public host, with no redirects. Prizerail sends Accept: application/json and gives up after 8 seconds.
Prizerail doesn’t sign its requests yet. If your list shouldn’t be readable by anyone who finds the URL, put an unguessable token in the path, such as https://api.acme.com/prizerail/8f3a2c…/{drawingId}. The URL is stored like a secret and never shown publicly.
The response
The same body the send winners endpoint takes, with the same rules: exactly the expected count, no repeats, names and avatars optional.When it’s fetched
- Every 5 minutes in the 2 hours before each cutoff. The last fetch can be up to 5 minutes before the cutoff, so have the list final at least 10 minutes early.
- Until your draw has happened, return
404, an empty list, or nowinnerskey. Prizerail tries again. - Nothing is stored until the full list is there.
- If the list changes before the cutoff, the newer one replaces the earlier one.
- At the cutoff the list locks, exactly as if it had been posted.
Confirming it arrived
Read the drawing with the API. Once a fetch has succeeded, itswinners holds your list:
winners with status still open means nothing has been accepted yet. Once status is locked, verification.winnersCommitment is the fingerprint of the list that locked. See Drawings.
