API Reference
Instant Win
Manage instant win games and record plays
Instant Win
Instant win games are slim contests with a server-side prize draw. Visitors play first; they only enter an email when claiming a win.
mechanic, layout, and entryLimit are set at create time and cannot be changed later.
List Games
/api/v1/instant-win-gamesQuery Parameters
slugstring optional Filter by preset: `spin-to-win`, `scratch-and-win`, `mystery-box`, `advent-calendar`, `plinko`, `slot-machine`, `golden-egg`, or `claw-machine`. Retired presets (`trade-show-prize-wheel`, `daily-login-game`, `coupon-roulette`, `in-store-kiosk`) are still accepted as filters for existing games.
pagenumber optional default: 1Page number
limitnumber optional default: 20Items per page (1-100)
Get Game
/api/v1/instant-win-games/:gameIdReturns config, tiers, odds, inventory (quantity), and unique-code counts.
Create Game
/api/v1/instant-win-gamesRequest Body
slugstring required Preset identifier: `spin-to-win`, `scratch-and-win`, `mystery-box`, `advent-calendar`, `plinko`, `slot-machine`, `golden-egg`, or `claw-machine`
titlestring required Game title
mechanicstring required `wheel`, `scratch`, `box`, `advent`, `plinko`, `slots`, `egg`, or `claw`
layoutstring required `default` or `fullscreen`
entryLimitstring required `none`, `daily`, or `device`
tiersarray required At least two tiers. Odds must sum to 100. Non-miss tiers need a `redeemCode` or `redeemUrl`.
publishAsstring required `landing` or `embed`
embedUrlstring optional Required when publishing as a widget
Request
curl -X POST https://blitzrocket.com/api/v1/instant-win-games \
-H "x-api-key: your_private_key_here" \
-H "Content-Type: application/json" \
-d '{
"slug": "spin-to-win",
"title": "Summer wheel",
"mechanic": "wheel",
"layout": "default",
"entryLimit": "daily",
"publishAs": "landing",
"tiers": [
{ "id": "win", "name": "20% off", "oddsPercent": 20, "deliveryType": "code", "redeemCode": "SUMMER20" },
{ "id": "miss", "name": "Try again", "oddsPercent": 80, "isMiss": true }
]
}'
Update Game
/api/v1/instant-win-games/:gameIdYou can change title, description, tiers, publish mode, and status. Attempts to change mechanic, layout, or entryLimit are ignored.
Delete Game
/api/v1/instant-win-games/:gameIdIf the game has claimed entries, pass ?force=true or the API returns 409.
Play
/api/v1/instant-win-games/:gameId/playRuns the weighted draw. Wins are reserved for 24 hours. Fulfillment is hidden until claim.
Request Body
playCookiestring optional Device cookie from a previous play. Store and reuse the returned `playCookie`.
Response
{
"success": true,
"data": {
"playId": "play_abc",
"playCookie": "a1b2c3d4",
"alreadyPlayed": false,
"result": {
"id": "win",
"name": "20% off",
"isMiss": false,
"color": "#F59E0B"
}
}
}
entryLimit of daily or device returns 403 if the cookie or IP has already played.
Claim
/api/v1/instant-win-games/:gameId/plays/:playId/claimCreates an entry, marks the play claimed, and emails the prize.
Request Body
emailstring required Winner email address
playCookiestring optional Same cookie returned by play
Response
{
"success": true,
"data": {
"alreadyClaimed": false,
"prizeName": "20% off",
"couponCode": "SUMMER20",
"redeemUrl": null
}
}
List Plays
/api/v1/instant-win-games/:gameId/playsPaginated play log with status (pending, claimed, miss, expired), tier, and claimed email.