Games You Play REST API
Overview
The Games You Play (GYP) REST API enables server-side management of recreational games, including game retrieval, cancellation, and completion operations.
Prerequisites
API key configured per API Setup
Understanding of GYP game lifecycle and statuses
Base URL
Sandbox: https://api.sandbox.lucrasports.com
Production: https://api.lucrasports.comAuthentication
All requests require authentication via the X-Lucra-Api-Key header. See API Setup for details.
Endpoints
Get Matchup
Retrieve details for a specific recreational game.
Path Parameters:
matchupId(string, required) - UUID of the matchup
Response:
Matchup Field Descriptions:
id
string
UUID of the matchup
createdByUserId
string
UUID of the user who created the game
gameId
string
External game identifier
winnerGroupId
string
UUID of the winning group (null if game not settled)
status
string
Current game status (see Game Statuses below)
type
string
Always RECREATIONAL_GAME
subtype
string
Game subtype (see Game Subtypes below)
buyInAmount
number
Entry fee per participant
isPublic
boolean
Whether the game is publicly visible
groups
array
Array of participant groups
Group Field Descriptions:
groupId
string
UUID of the group
name
string
Display name for the group
users
array
Array of users participating in group
User Field Descriptions:
userId
string
UUID of the user
username
string
Display name of the user
Game Statuses:
OPEN- Game created, accepting playersCONFIRMED- Minimum players joined, game confirmedLOCKED- Game locked, no more players can joinPENDING_OUTCOMES- Game in progress, awaiting resultsCLOSED- Game completed with winnerCLOSED_TIE- Game completed in a tieDISPUTE- Game outcome disputedCANCELED_BY_OWNER- Owner canceled the gameCANCELED_NOT_ACCEPTED- Canceled due to insufficient playersCANCELED_THROUGH_API- Canceled via API callCANCELED_TIMEOUT- Canceled due to timeout
Game Subtypes:
GROUP_VS_GROUP- Team-based gamesFREE_FOR_ALL- Individual player games
Cancel Matchup
Cancel an existing recreational game.
Path Parameters:
matchupId(string, required) - UUID of the matchup to cancel
Request Body:
Response:
Notes:
Cancellation refunds buy-ins to all participants
Only games in
OPENorCONFIRMEDstatus can be canceledTriggers
RecreationalGameCanceledwebhook event
Complete Matchup
Mark a recreational game as complete and declare outcome.
Path Parameters:
matchupId(string, required) - UUID of the matchup to complete
Request Body (with winner):
Request Body (tie):
Field Descriptions:
isTie
boolean
Yes
Set to true for a tie, false for a winner
winningGroupId
string
No
UUID of the winning group (required when isTie is false, omit if true)
Response:
Notes:
winningGroupIdmust match a group participating in the matchupCompleting a game distributes winnings to winners
Status changes to
CLOSEDorCLOSED_TIEdepending on outcomeTriggers
RecreationalGameCompletedwebhook event
Error Handling
Standard HTTP status codes are used:
200
Success
400
Bad Request - Invalid parameters
401
Unauthorized - Invalid or missing API key
404
Not Found - Matchup does not exist
500
Internal Server Error
Game Lifecycle
Related Documentation
Games You Play Webhooks - Webhook events for GYP games
Free-to-Play REST API - Free-to-play variant endpoints
Webhook Setup - Configure webhook subscriptions
Last updated
