Skip to content

Play Game

POST /v1/games/play

Executes a game play for a user. Deducts points, determines the outcome using the server-side RNG, and returns the result with the reward.

HeaderRequiredValue
X-API-KeyYesYour public key
Content-TypeYesapplication/json
FieldTypeRequiredDescription
userIdstringYesThe user’s external ID in your system
gameTypestringYesOne of NEON_WHEEL, COSMIC_SLOTS, ENIGMA_BOXES
Terminal window
curl -X POST https://api.gamifyhost.com/v1/games/play \
-H "X-API-Key: pk_live_your_public_key" \
-H "Content-Type: application/json" \
-d '{
"userId": "user_12345",
"gameType": "NEON_WHEEL"
}'

Status: 200 OK

{
"message": "Game played successfully",
"code": 200,
"status": "success",
"data": {
"playId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"gameType": "NEON_WHEEL",
"userId": "user_12345",
"pointsSpent": 100,
"userBalance": 4900,
"outcome": {
"winningSegment": 3,
"spinAngle": 247.5
},
"reward": {
"tier": "rare",
"type": "cashback",
"value": 50,
"label": "$0.50 cashback"
},
"environment": "LIVE",
"playedAt": "2025-07-15T10:30:00Z"
}
}
FieldTypeDescription
playIduuidUnique play record identifier
gameTypestringGame that was played
userIdstringThe user who played
pointsSpentintegerPoints deducted for this play
userBalanceintegerUser’s remaining balance after deduction
outcomeobjectGame-specific outcome (segment index, reel positions, box index, etc.)
reward.tierstringepic, rare, or common
reward.typestringcashback, xp, points, item, or special
reward.valueintegerNumeric reward value
reward.labelstringHuman-readable reward label
environmentstringLIVE or TEST
playedAtdatetimeISO 8601 timestamp
CodeMessage
400Invalid request body / validation error
402Insufficient points
404Game mechanic not found
404User not found