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

Event
Trigger

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 identifier

  • tenantId (string) - Your tenant identifier

  • matchup (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 UUID

  • title - Tournament name

  • type - CASH_FIXED or CASH_PERCENTAGE

  • status - Current tournament status

  • buyInAmount - Entry fee

  • maxParticipants - Maximum participants

  • scoringType - HIGHEST_SCORE or LOWEST_SCORE

  • paymentStructure - Prize distribution

  • users - Array of participants with scores and rankings

  • And 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.users array

  • newUserId provides 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 metadataString for 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.users includes final scores, rankings, and rewards

  • Rewards already distributed by platform

  • Check mode to 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

Last updated