Tournament Webhooks
Overview
Tournament webhooks deliver real-time notifications for tournament lifecycle events. All tournament webhooks follow the verification process described in Webhook Setup.
Prerequisites
Webhook endpoint configured per Webhook Setup
Subscribed to relevant tournament event types
Signature verification implemented
Event Types
TournamentCreated
New tournament created
TournamentEdited
Tournament details modified via API
TournamentUserJoined
User joins tournament
TournamentCanceled
Tournament canceled
TournamentCompleted
Tournament completed with results
Common Payload Structure
All tournament webhook events share a base structure:
Base Fields
event(string) - Event type identifiertenantId(string) - Your tenant identifiermatchup(object) - Tournament data (matches GET tournament API response)
Matchup Object
The matchup object structure matches the response from the Get Tournament endpoint and includes:
id- Tournament UUIDtitle- Tournament nametype-CASH_FIXEDorCASH_PERCENTAGEstatus- Current tournament statusbuyInAmount- Entry feemaxParticipants- Maximum participantsscoringType-HIGHEST_SCOREorLOWEST_SCOREpaymentStructure- Prize distributionusers- Array of participants with scores and rankingsAnd all other tournament properties
Event Details
TournamentCreated
Triggered when a new tournament is created.
Payload:
Use Cases:
Notify users of new tournament availability
Publish tournament to external platforms
Initialize tournament tracking systems
Send promotional notifications
TournamentEdited
Triggered when tournament properties are modified via API.
Payload:
Use Cases:
Notify participants of tournament changes
Update external listings
Log audit trail of modifications
Trigger re-validation logic
Notes:
Payload contains updated tournament state
Compare with previous state to determine what changed
Not all field changes may trigger this event
TournamentUserJoined
Triggered when a user joins the tournament.
Payload:
Additional Fields:
newUserId(string) - UUID of the user who joined
Use Cases:
Notify other participants of new competitor
Update participant count displays
Trigger welcome messages
Update tournament capacity tracking
Notes:
Full user details available in
matchup.usersarraynewUserIdprovides quick access to joining user
TournamentCanceled
Triggered when a tournament is canceled.
Payload:
Use Cases:
Process refunds for participants
Send cancellation notifications
Remove from active tournament listings
Log cancellation reasons
Notes:
Entry fees automatically refunded to participants
Tournament removed from active queries
Check
metadataStringfor cancellation reason if provided
TournamentCompleted
Triggered when tournament is finalized with results.
Payload:
Additional Fields:
mode(string) - Reward resolution method:"auto"- Rewards calculated by Lucra scoring logic"manual"- Rewards assigned via API completion request
Use Cases:
Distribute winnings
Update player statistics and leaderboards
Send completion notifications with results
Archive tournament data
Trigger achievement/badge systems
Notes:
matchup.usersincludes final scores, rankings, and rewardsRewards already distributed by platform
Check
modeto understand how winners were determined
Webhook Handling Best Practices
Idempotency
Tournament webhooks may be redelivered. Implement idempotent handling:
User Joined Event Optimization
When handling TournamentUserJoined, use newUserId to avoid scanning the full users array:
Completion Mode Handling
Handle different completion modes appropriately:
Error Handling
Return appropriate HTTP status codes to control webhook redelivery:
TypeScript Types
Related Documentation
Tournaments REST API - Tournament management endpoints
Webhook Setup - Webhook subscription and verification
Games You Play Webhooks - GYP game webhooks
Last updated
