Webhook Configuration

Webhook Configuration

Webhooks are configured through the Destinations system in the CMS. Each tenant can configure multiple webhook destinations with custom filtering and translation.

Configuration Schema

{
  "tenant_id": "b79afb82-36b0-44f2-9102-494fa8e3c52f",
  "name": "Production Analytics Webhook",
  "destination_type": "webhook",
  "config": {
    "url": "https://api.example.com/webhooks/sports-stack",
    "shared_secret": "your-secret-key-here",
    "headers": {
      "Authorization": "Bearer token123",
      "X-Custom-Header": "value"
    },
    "timeout_ms": 5000
  },
  "streams": ["change_log"],
  "entity_filters": ["event", "team", "player"],
  "is_active": true,
  "priority": 100
}

Configuration Fields

FieldTypeRequiredDescription
urlstringYesHTTPS endpoint URL to receive webhooks
shared_secretstringNoSecret for HMAC-SHA256 signature verification
headersobjectNoCustom HTTP headers to include in requests
timeout_msintegerNoRequest timeout in milliseconds (default: 5000)

Setting Up via CMS

  1. Navigate to Integrations → Destinations in the CMS
  2. Click "New Destination"
  3. Select "Webhook" as the destination type
  4. Fill in configuration:
    • Name: Descriptive name for the destination
    • URL: Your HTTPS webhook endpoint
    • Shared Secret: (Optional) Secret for signature verification
    • Streams: Select change_log stream
    • Entity Types: Filter which entities trigger webhooks (leave empty for all)
    • Priority: Lower numbers = higher priority (default: 100)

Entity Filtering

Specify which entity types trigger webhooks using entity_filters:

{
  "entity_filters": ["event", "team", "player"]
}

Available Entity Types

  • team
  • player
  • event
  • league
  • season
  • sport
  • market
  • odd
  • event_scoped_stats
  • season_scoped_stats
  • standings
  • injury
  • news

Note: Leave entity_filters empty to receive notifications for all entity types.

Testing Configuration

Use the built-in webhook tester to verify your configuration:

  1. Navigate to Admin → Webhook Tester in the CMS
  2. Select your tenant
  3. Copy the generated test URL
  4. Create a temporary destination using the test URL
  5. Trigger a data change
  6. Inspect the payload in the Webhook Tester interface

Related Documentation