Lucra Sports Webhooks API

Manage webhook configurations to receive real-time event notifications via HTTP POST requests. --- ## Available Event Types | Event | Description | |-------|-------------| | `UserSignedUp` | New user registration | | `UserKYCVerified` | User KYC verification completed | | `FundsDeposited` | User deposited funds | | `C2CWithdrawal` | Convert-to-credit withdrawal initiated | | `TournamentCreated` | Tournament created | | `TournamentCanceled` | Tournament canceled | | `TournamentCompleted` | Tournament completed | | `TournamentCompletionFailed` | Tournament completion failed (async processing error). Payload contains `failure: { code, reason, requestId, attempt, willRetry }`. `willRetry: false` is terminal — subscribe to be notified when a completion request cannot be processed. | | `TournamentComplianceLimitExceeded` | Tournament completion placed on hold due to compliance payout limit | | `TournamentEdited` | Tournament modified | | `TournamentUserJoined` | User joined tournament | | `ScoreIngestionFailed` | Score ingestion failed (async processing error). Payload contains `failure: { code, reason, requestId, attempt, willRetry }`. `willRetry: false` is terminal — subscribe to be notified when a score submission cannot be processed. | | `RecreationalGameCreated` | Recreational game created | | `RecreationalGameJoined` | User joined recreational game | | `RecreationalGameCanceled` | Recreational game canceled | | `RecreationalGameCompleted` | Recreational game completed | | `RecreationalGameStarted` | Recreational game started | | `RecreationalGameCompletionFailed` | Recreational game completion failed (async processing error). Payload contains `failure: { code, reason, requestId, attempt, willRetry }`. `willRetry: false` is terminal — subscribe to be notified when a completion request cannot be processed. | --- ## Event Payloads All events include an `event` field identifying the type. The remaining fields depend on the event. ### Tournament Events Applies to: `TournamentCreated`, `TournamentEdited`, `TournamentCanceled`, `TournamentCompleted`, `TournamentUserJoined`, `TournamentComplianceLimitExceeded` ```json { "event": "TournamentCreated", "tenantId": "YOUR_TENANT_ID", "matchup": { } } ``` The `matchup` object matches the legacy tournament response shape (equivalent to the legacy `GET /api/rest/pool-tournament/{id}`) **Additional fields by event:** | Event | Extra Fields | |-------|-------------| | `TournamentCompleted` | `mode`: `"auto"` | `"manual"` | `"admin"` — how winners were determined | | `TournamentUserJoined` | `newUserId`: UUID of the user who joined; `userMetadata`: their metadata | | `TournamentComplianceLimitExceeded` | `complianceLimits`: compliance threshold details | **Failure events** — `TournamentCompletionFailed`, `ScoreIngestionFailed`: ```json { "event": "TournamentCompletionFailed", "tenantId": "YOUR_TENANT_ID", "entityId": "uuid", "failure": { "code": "COMPLETION_FAILED", "reason": "Human-readable description", "requestId": "uuid", "attempt": 1, "willRetry": true } } ``` `willRetry: false` is terminal — no further delivery attempts will be made. --- ### Recreational Games Events Applies to: `RecreationalGameCreated`, `RecreationalGameJoined`, `RecreationalGameCanceled`, `RecreationalGameCompleted`, `RecreationalGameStarted` ```json { "event": "RecreationalGameCreated", "id": "uuid", "createdByUserId": "uuid", "gameId": "external-game-id", "status": "OPEN", "type": "RECREATIONAL_GAME", "subtype": "GROUP_VS_GROUP", "buyInAmount": 10, "isPublic": true, "winnerGroupId": null, "metadata": null, "groups": [ { "groupId": "uuid", "name": "Team Alpha", "users": [ { "userId": "uuid", "userMetadata": {}, "reward": { "type": "CASH", "value": "20.00", "metadata": null } } ] } ] } ``` `reward.type` is `"CASH"` for buy-in games or `"TENANT_REWARD"` for reward-based games. `RecreationalGameJoined` includes an additional `joinedByUserId` field with the UUID of the user who joined. **Failure events** — `RecreationalGameCompletionFailed`, `ScoreIngestionFailed`: ```json { "event": "RecreationalGameCompletionFailed", "tenantId": "YOUR_TENANT_ID", "entityId": "uuid", "failure": { "code": "COMPLETION_FAILED", "reason": "Human-readable description", "requestId": "uuid", "attempt": 1, "willRetry": true } } ``` `willRetry: false` is terminal — no further delivery attempts will be made. --- ## Configuration Limits - **Maximum 5 webhook configurations** per account - **Single-instance subscriptions**: Some events (e.g., `C2CWithdrawal`) can only exist in one configuration at a time - **Custom headers**: Optional headers added to each webhook request - **Expiration**: Optionally set an expiration date for time-limited webhooks --- ## Request Verification All webhook requests include an `X-Lucra-Signature` header containing an HMAC-SHA256 signature for payload verification. **Signature format:** ``` X-Lucra-Signature: sha256= ``` **Verification steps:** 1. Extract signature from the `X-Lucra-Signature` header 2. Capture the raw request body (before JSON parsing) 3. Compute HMAC-SHA256 of the raw body using your sign secret 4. Compare computed signature with received signature using constant-time comparison **Node.js example:** ```typescript import crypto from 'crypto'; function verifyWebhookSignature( rawBody: Buffer, signature: string, secret: string ): boolean { if (!signature.startsWith('sha256=')) return false; const received = signature.substring(7); const computed = crypto .createHmac('sha256', secret) .update(rawBody) .digest('hex'); if (received.length !== computed.length) return false; return crypto.timingSafeEqual( Buffer.from(received), Buffer.from(computed) ); } ``` --- ## Security Best Practices - **Use raw body** — verify signature against the raw request body before parsing JSON - **Constant-time comparison** — use timing-safe comparison functions to prevent timing attacks - **Secure secret storage** — store sign secrets in environment variables or secret managers - **HTTPS only** — only accept webhooks over HTTPS - **Idempotency** — handle duplicate webhook deliveries gracefully

Business capability
Webhook & Event Subscription Management BC-4270.80

Operations 4

POST /api/rest/webhook/configs Create Webhook Configuration #
GET /api/rest/webhook/configs List Webhook Configurations #
PUT /api/rest/webhook/configs/{id} Update Webhook Configuration #
DELETE /api/rest/webhook/configs/{id} Delete Webhook Configuration #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/lucra-sports-webhooks-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

lucra-sports-webhooks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Lucra Forge Webhooks API
  description: See https://docs.lucrasports.com/lucra-sdk/sdks-and-apis for implementation details.
  version: '1.0'
  contact: {}
servers:
- url: /
  description: Current host
- url: https://forge.lucrasports.com
  description: Production
- url: https://forge.sandbox.lucrasports.com
  description: Sandbox
tags:
- name: Webhooks
  description: Manage webhook configurations to receive real-time event notifications via HTTP POST requests.
paths:
  /api/rest/webhook/configs:
    post:
      description: 'Create a new webhook configuration for the authenticated tenant.


        The request body is wrapped in an `object` key. Required fields are `subscriptions` and `webhookUrl`.


        **Limits:**

        - Maximum 5 webhook configurations per account

        - Some events (e.g., `C2CWithdrawal`) can only exist in one configuration at a time'
      operationId: WebhooksController_createWebhook
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookCreateDto'
      responses:
        '201':
          description: Webhook configuration created successfully
          headers:
            X-Request-Id:
              description: Unique request identifier for tracing and debugging.
              schema:
                type: string
              example: req_abc123
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponseDto'
      security:
      - X-Lucra-Api-Key: []
      summary: Create Webhook Configuration
      tags:
      - Webhooks
    get:
      description: Returns all webhook configurations for the authenticated tenant.
      operationId: WebhooksController_listWebhooks
      parameters: []
      responses:
        '200':
          description: Webhook configurations retrieved successfully
          headers:
            X-Request-Id:
              description: Unique request identifier for tracing and debugging.
              schema:
                type: string
              example: req_abc123
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/WrappedWebhookResponseDto'
      security:
      - X-Lucra-Api-Key: []
      summary: List Webhook Configurations
      tags:
      - Webhooks
  /api/rest/webhook/configs/{id}:
    put:
      description: 'Update an existing webhook configuration.


        All fields are optional — only the provided fields are updated.'
      operationId: WebhooksController_updateWebhook
      parameters:
      - name: id
        required: true
        in: path
        description: Webhook configuration UUID
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookUpdateDto'
      responses:
        '200':
          description: Webhook configuration updated successfully
          headers:
            X-Request-Id:
              description: Unique request identifier for tracing and debugging.
              schema:
                type: string
              example: req_abc123
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponseDto'
        '404':
          description: Webhook configuration not found
          headers:
            X-Request-Id:
              description: Unique request identifier for tracing and debugging.
              schema:
                type: string
              example: req_abc123
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - X-Lucra-Api-Key: []
      summary: Update Webhook Configuration
      tags:
      - Webhooks
    delete:
      description: Permanently delete a webhook configuration.
      operationId: WebhooksController_deleteWebhook
      parameters:
      - name: id
        required: true
        in: path
        description: Webhook configuration UUID
        schema:
          type: string
      responses:
        '204':
          description: Webhook configuration deleted successfully
        '404':
          description: Webhook configuration not found
          headers:
            X-Request-Id:
              description: Unique request identifier for tracing and debugging.
              schema:
                type: string
              example: req_abc123
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - X-Lucra-Api-Key: []
      summary: Delete Webhook Configuration
      tags:
      - Webhooks
components:
  schemas:
    WebhookResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Webhook configuration UUID
          example: 44c3e83c-8d8b-475b-9018-75bf831d0ade
        name:
          type: string
          description: Display name for this webhook configuration
          example: Production Webhook
        description:
          type: string
          description: Description of the webhook configuration
          example: Main webhook endpoint
        webhookUrl:
          type: string
          description: HTTPS URL that receives webhook POST requests
          example: https://your-domain.com/webhooks/lucra
        subscriptions:
          description: Event types this webhook is subscribed to
          example:
          - UserSignedUp
          - FundsDeposited
          type: array
          items:
            type: string
        active:
          type: boolean
          description: Whether this webhook configuration is active
          example: true
        headers:
          type:
          - object
          - 'null'
          description: JSON string of custom headers included in webhook requests
          example: '{"X-Custom-Header":"value"}'
        expirationDate:
          type:
          - object
          - 'null'
          description: ISO 8601 timestamp after which this configuration becomes inactive
          example: '2025-12-31T23:59:59.000Z'
      required:
      - id
      - name
      - description
      - webhookUrl
      - subscriptions
      - active
      - headers
      - expirationDate
    Error:
      type: object
      properties:
        code:
          type: string
          description: Machine-readable HTTP error code
          example: NOT_FOUND
        errCode:
          type: string
          description: Machine-readable business error code
          example: TOURNAMENT_NOT_FOUND
        message:
          type: string
          description: Human-readable error message
          example: Tournament not found
      required:
      - code
      - errCode
      - message
    WrappedWebhookResponseDto:
      type: object
      properties:
        configs:
          description: List of webhook configurations
          type: array
          items:
            $ref: '#/components/schemas/WebhookResponseDto'
      required:
      - configs
    WebhookUpdateDto:
      type: object
      properties:
        subscriptions:
          description: Array of event types to subscribe to (see tag description for available types)
          example:
          - UserSignedUp
          - FundsDeposited
          type: array
          items:
            type: string
        webhookUrl:
          type: string
          description: HTTPS URL that will receive webhook POST requests
          example: https://your-domain.com/webhooks/lucra
        name:
          type: string
          description: Display name for this webhook configuration
          example: Production Webhook
        description:
          type: string
          description: Description of the webhook configuration
          example: Main webhook endpoint
        active:
          type: boolean
          description: 'Whether this configuration is active (default: true)'
          example: true
        headers:
          type: string
          description: JSON string of custom headers to include with each webhook request
          example: '{"X-Custom-Header": "value"}'
        expirationDate:
          type: string
          description: ISO 8601 timestamp after which the configuration becomes inactive
          example: '2025-12-31T23:59:59Z'
        signSecret:
          type: string
          description: 'Secret used to sign webhook payloads for HMAC-SHA256 verification (default: random uuid)'
          example: 44c3e83c-8d8b-475b-9018-75bf831d0ade
    WebhookCreateDto:
      type: object
      properties:
        object:
          $ref: '#/components/schemas/WebhookCreateObjectDto'
      required:
      - object
    WebhookCreateObjectDto:
      type: object
      properties:
        subscriptions:
          description: Array of event types to subscribe to (see tag description for available types)
          example:
          - UserSignedUp
          - FundsDeposited
          type: array
          items:
            type: string
        webhookUrl:
          type: string
          description: HTTPS URL that will receive webhook POST requests
          example: https://your-domain.com/webhooks/lucra
        name:
          type: string
          description: Display name for this webhook configuration
          example: Production Webhook
        description:
          type: string
          description: Description of the webhook configuration
          example: Main webhook endpoint
        active:
          type: boolean
          description: 'Whether this configuration is active (default: true)'
          example: true
        headers:
          type: string
          description: JSON string of custom headers to include with each webhook request
          example: '{"X-Custom-Header": "value"}'
        expirationDate:
          type: string
          description: ISO 8601 timestamp after which the configuration becomes inactive
          example: '2025-12-31T23:59:59Z'
        signSecret:
          type: string
          description: 'Secret used to sign webhook payloads for HMAC-SHA256 verification (default: random uuid)'
          example: 44c3e83c-8d8b-475b-9018-75bf831d0ade
      required:
      - subscriptions
      - webhookUrl
  securitySchemes:
    X-Lucra-Api-Key:
      type: apiKey
      in: header
      name: X-Lucra-Api-Key
      description: API key for tenant authentication