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.
How It Works
Section titled “How It Works”- Browse active lotteries via the API to see what’s available
- Enter users into a lottery by providing their email and optional user ID
- Track entries — list all tickets your account has entered for a specific lottery
- Fund prizes — contribute funds to increase a lottery’s prize pool
Lotteries support multiple types:
| Type | Description |
|---|---|
STANDARD_DRAW | Classic number draw — pick main + bonus numbers |
SKILL_LUCK | Play a skill game to qualify, then enter the draw |
POPULATION_BASED | Weighted by country population data |
CHARITY_NATION | Portion of proceeds goes to charity |
GLOBAL_CIVIC | Earn entries through civic actions |
Authentication
Section titled “Authentication”All Lottery API endpoints require your API Secret Key:
| Header | Required | Value |
|---|---|---|
X-API-Secret | Yes | Your secret key (e.g., sk_live_... or sk_test_...) |
Content-Type | Yes | application/json (for POST requests) |
Base URL
Section titled “Base URL”https://api.gamifyhost.com/v1/lotteriesAvailable Endpoints
Section titled “Available Endpoints”| Method | Endpoint | Description |
|---|---|---|
GET | /available | List active lotteries |
POST | /entries | Enter a user into a lottery |
GET | /{slug}/entries | List your entries for a lottery |
Lottery Lifecycle
Section titled “Lottery Lifecycle”Each lottery goes through these statuses:
| Status | Description |
|---|---|
DRAFT | Being configured, not yet visible |
ACTIVE | Open for entries — visible via the API |
PAUSED | Temporarily suspended |
COMPLETED | All draws finished |
EXPIRED | Past its end date |
Draw Frequency
Section titled “Draw Frequency”Lotteries run draws on a schedule:
| Frequency | Description |
|---|---|
DAILY | One draw per day |
WEEKLY | One draw per week on configured days |
MONTHLY | One draw per month |
CUSTOM | Custom schedule set by the admin |
Entry Methods
Section titled “Entry Methods”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:
| Method | Description |
|---|---|
PARTNER_API | Entered by a partner via this API |
PURCHASE | User purchased a ticket |
FREE | Free entry |
SKILL_CHALLENGE | Earned by completing a skill game |
CIVIC_ACTION | Earned through civic actions |
CHARITY_DONATION | Earned through a charity donation |