Skip to content

Lotteries API

The Lotteries API lets you integrate lottery mechanics into your platform. Browse active lotteries created by GamifyHost admins, enter your users into draws, track their entries, and fund prize pools to boost jackpots.

  1. Browse active lotteries via the API to see what’s available
  2. Enter users into a lottery by providing their email and optional user ID
  3. Track entries — list all tickets your account has entered for a specific lottery
  4. Fund prizes — contribute funds to increase a lottery’s prize pool

Lotteries support multiple types:

TypeDescription
STANDARD_DRAWClassic number draw — pick main + bonus numbers
SKILL_LUCKPlay a skill game to qualify, then enter the draw
POPULATION_BASEDWeighted by country population data
CHARITY_NATIONPortion of proceeds goes to charity
GLOBAL_CIVICEarn entries through civic actions

All Lottery API endpoints require your API Secret Key:

HeaderRequiredValue
X-API-SecretYesYour secret key (e.g., sk_live_... or sk_test_...)
Content-TypeYesapplication/json (for POST requests)
https://api.gamifyhost.com/v1/lotteries
MethodEndpointDescription
GET/availableList active lotteries
POST/entriesEnter a user into a lottery
GET/{slug}/entriesList your entries for a lottery

Each lottery goes through these statuses:

StatusDescription
DRAFTBeing configured, not yet visible
ACTIVEOpen for entries — visible via the API
PAUSEDTemporarily suspended
COMPLETEDAll draws finished
EXPIREDPast its end date

Lotteries run draws on a schedule:

FrequencyDescription
DAILYOne draw per day
WEEKLYOne draw per week on configured days
MONTHLYOne draw per month
CUSTOMCustom schedule set by the admin

When you enter a user via the API, the entry method is recorded as PARTNER_API. Other entry methods exist for users who enter directly through the lottery microsite:

MethodDescription
PARTNER_APIEntered by a partner via this API
PURCHASEUser purchased a ticket
FREEFree entry
SKILL_CHALLENGEEarned by completing a skill game
CIVIC_ACTIONEarned through civic actions
CHARITY_DONATIONEarned through a charity donation