This guide explains the steps to onboard and start receiving Moments notifications on your systems. To integrate, you need an HTTPS endpoint that can receive and verify our requests.
Moments notifies you in real time when something happens in a live match that matches a predefined condition, for example "a goal is scored and the home team has at least 2 goals".
Each time one of those conditions (a trigger) fires, Moments sends a signed HTTPS POST with a JSON event to your endpoint (a webhook).
Follow these two steps for each endpoint you want to receive Moments events on.
Send your endpoint URL to your Sportradar contact. The endpoint must:
POST requests with a JSON body.All deliveries come from these fixed IP addresses, make sure inbound requests from all of them are allowed:
34.246.3.2652.30.67.15752.209.251.74POST <your endpoint URL>
Content-Type: application/json
x-webhook-signature: t=1794401271,v1=5d2c0e...
x-webhook-timestamp: 1794401271
<Moments event JSON>Main fields:
fact contains:
| Field | Description |
|---|---|
fact.raw | The match event itself: type (for example goal), team (home or away), time (match minute) and uts (Unix timestamp). |
fact.state | The state of the match at that moment, such as the score. |
fact.info | Match details: competition (competition_id, competition_name) and teams (home_team, away_team, each with id, name, country_code, country_name). |
timestamps contains (ISO 8601, UTC):
| Field | Description |
|---|---|
occurredAt | When the moment happened in the match. |
receivedAt | When Moments received the match data. |
firedAt | When the trigger fired. |
dispatchedAt | When the notification was dispatched. |
Example:
{
"advertiserId": "123",
"triggerId": "35g7af90-4929-72ea-a95g-c63d041f9d6b",
"name": "Home team goal",
"fireId": "3369224334g870773cae8bc8ej7h43u3",
"
2xx within 5 seconds. Acknowledge first, then process asynchronously.timestamps.occurredAt field for custom ordering.If you have a staging environment and want to register a staging webhook as well, we can set it up for you.
Webhooks include a signature that you can use to verify them. After registering the webhook Sportradar can send you its signing secret through a secure channel.
4.2.1 Headers
| Header | Example | Description |
|---|---|---|
x-webhook-signature | t=1794401271,v1=5d2c0e... | t = Unix timestamp (seconds), v1 = hex HMAC-SHA256. |
x-webhook-timestamp | 1794401271 | Same value as t. |
4.2.2 Verification algorithm
x-webhook-signature on ,, then each part on the first =, to get t and v1.t + . + raw body.HMAC-SHA256(key = signing secret as UTF-8, message) and hex-encode it (lowercase). Use the signing secret exactly as received, as a text string. Do not hex-decode it.v1 using a constant-time comparison.t is more than 5 minutes from your current time.401 and do not process the event.4.2.3 Examples
The examples below implement the algorithm from section 4.1.2 as a single function you can copy into your endpoint. Call it with the raw request body, the value of the x-webhook-signature header and your signing secret. It returns true if the request is authentic and recent, and false otherwise. If it returns false, respond 401 and do not process the event.
secrets is a list so that you can accept both the current and the previous secret while rotating. Normally it contains just one secret.
Python:
import hashlib
import hmac
import time
def verify_moments_webhook(body: bytes, signature_header: str, secrets: list[str], tolerance_seconds: int = 300) -> bool:
Node.js:
const crypto = require('node:crypto');
function verifyMomentsWebhook(rawBody, signatureHeader, secrets, toleranceSeconds = 300) {
if (typeof signatureHeader !== 'string') {
return false;
Check on a live match that events arrive.
To rotate the signing secret, or to change, pause or remove the webhook, contact your Sportradar contact. (in the future there will be a UI interface for this)
| Field | Type | Description |
|---|---|---|
advertiserId | string | Your advertiser ID at Sportradar. |
triggerId | string | ID of the trigger that fired. |
name | string | Human-readable trigger name, for example “Home team goal”. |
fireId | string | Unique ID of this moment. You can use it to deduplicate. |
notificationId | string | ID of this notification. Useful when reporting an issue to Sportradar. |
eventId | string | Sportradar match ID. |
sportId | string | Sportradar sport ID, for example "1" for soccer. |
fact | object | What happened in the match (see below). |
timestamps | object | When it happened and when it was processed (see below). |