API Docs

Minimal HTTP API for creating and verifying draws.

Authentication

Provide your API key via x-api-key header.

To get an API key, contact us.

Create a draw

Draws use hybrid randomness (drand). If drand is temporarily unavailable, the API may return 202 with a draw in pending_randomness status.

curl -X POST http://localhost:4000/api/v1/draws \
  -H 'content-type: application/json' \
  -H 'x-api-key: YOUR_KEY' \
  -d '{
    "participants": ["alice", "alice", "bob"],
    "n": 1
  }'

Get a draw

curl http://localhost:4000/api/v1/draws/DRAW_ID \
  -H 'x-api-key: YOUR_KEY'

Verify a draw

curl -X POST http://localhost:4000/api/v1/draws/DRAW_ID/verify \
  -H 'x-api-key: YOUR_KEY'