Webhooks
A webhook is a registered endpoint URL paired with a feed subscription. RaceHooks POSTs a JSON payload to that URL for every matching event during a live session. The webhook infrastructure is sport-agnostic — the same endpoint, signature verification, and filter system works across every sport RaceHooks supports. Each webhook is scoped to a single feed, and you can apply filters to narrow which events trigger a delivery.
Lifecycle
Webhooks have three operational states:
Create a webhook
Each webhook subscribes to exactly one feed. To receive multiple feeds at the same endpoint, create one webhook per feed. The webhookSecret is available at creation time and retrievable anytime via GET /v1/webhooks/:id/secret.
webhookSecret anytime via GET /v1/webhooks/:id/secret. To issue a new secret, rotate it from the webhook detail page or via POST /v1/webhooks/:id/rotate-secret. Rotation takes effect immediately.Request fields
| Field | Type | Description |
|---|---|---|
webhookUrl | string | Your HTTPS endpoint URL. Must be publicly reachable. Localhost is supported during Simulate replays. |
feedId | string | The feed to subscribe to. See Feed catalog for all available IDs. |
webhookMethod | string? | HTTP method for deliveries. Defaults to POST. Can be PUT. |
filters | object? | Optional delivery filter. See Filters below. |
Filters
Filters let you narrow which events trigger a delivery. They are evaluated per payload before each delivery attempt — only matching events are sent. Filters are supported on per-driver feeds (timingdata, stintdata, driverraceinfo, etc.) and on the raceevent feed.
Available filters
| Field | Type | Description |
|---|---|---|
drivers | string[] | Three-letter driver codes (TLAs). e.g. ["VER", "NOR"]. Resolved to driver numbers at delivery time. |
driverNumbers | string[] | Raw driver racing numbers. e.g. ["1", "4"]. Use drivers (TLAs) for readability. |
constructors | string[] | Team name keywords (case-insensitive partial match). e.g. ["ferrari", "mclaren"]. Resolved to all drivers on those teams using the current session's DriverList. |
positions | { min?: number; max?: number } | Race position range. Only delivers when at least one matching driver is within the specified position window. |
constructors and positions, a payload is delivered only when a constructor driver is within the position range."red bull" and "redbull" both match Red Bull Racing. The driver list is resolved live from the current session's DriverList feed, so mid-season team swaps are handled automatically.HMAC signatures
On the Live tier and above, every delivery includes an X-RaceHooks-Signature header containing an HMAC-SHA256 signature of the request body. Verifying this header proves the delivery originated from RaceHooks and the body was not tampered with in transit.
X-RaceHooks-Signature: sha256=a3f9b2c1d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0The signature is computed as:
Always verify against the raw request body bytes, not the parsed JSON object. Use a timing-safe comparison function (timingSafeEqual in Node.js, hmac.compare_digest in Python, subtle.ConstantTimeCompare in Go) to prevent timing attacks.
Rotate a secret
If a secret is compromised or you want to rotate it for security hygiene, call the rotation endpoint. The new secret takes effect immediately.
GET /v1/webhooks/:id/secret. Update your verification code before sending the next delivery.Delivery SLA and retries
RaceHooks retries failed deliveries with exponential backoff:
A delivery is considered successful when your endpoint returns a 2xx status code within 10 seconds. Any other response (timeout, 4xx, 5xx) triggers a retry.
The Live and Analytics tiers include a uniform 99.5% delivery SLA, measured per calendar month. The SLA covers delivery infrastructure and excludes upstream feed availability; remedies are service credits. Enterprise contracts negotiate custom terms.