API Reference
The RaceHooks API is a REST API returning JSON. All requests are authenticated via Bearer token and versioned under /v1. The API is sport-agnostic at the infrastructure level — feeds, webhooks, and simulate endpoints will serve all supported sports as the platform expands beyond F1.
https://api.racehooks.io/v1Authentication
RaceHooks uses OAuth 2.0 client credentials. Exchange your client_id and client_secret (from the console Keys page) for a Bearer token. All other endpoints require this token in the Authorization header. Tokens expire after 24 hours.
/v1/oauthWebhooks
Create, list, update, delete, and test webhook endpoint registrations.
Create a webhook
/v1/webhooks| Field | Type | Description |
|---|---|---|
webhookUrl | string (required) | The HTTPS endpoint to receive deliveries. Must be publicly reachable. |
feedId | string (required) | The feed to subscribe to. See the feed catalog for valid IDs. |
filters | object (optional) | { driverNumbers: string[] } — filter deliveries to specific driver numbers. Empty = all drivers. |
webhookSecret is returned once in the create response. Store it securely — it cannot be retrieved again.List webhooks
/v1/webhooksUpdate a webhook
/v1/webhooks/:id| Field | Type | Description |
|---|---|---|
active | boolean (optional) | Pause (false) or resume (true) deliveries to this webhook. |
Delete a webhook
/v1/webhooks/:idDelivery logs
/v1/webhooks/:id/logs| Field | Type | Description |
|---|---|---|
limit | integer (query) | Number of log entries to return. Default 50, max 500. |
cursor | string (query) | Pagination cursor from a previous response for the next page. |
Send a test delivery
/v1/webhooks/:id/testSends a sample payload to the registered endpoint. Useful for verifying your endpoint is reachable and signature verification is working.
Rotate webhook secret
/v1/webhooks/:id/rotate-secretGenerates a new webhook secret. The new secret takes effect immediately. Retrieve it anytime via GET /v1/webhooks/:id/secret.
Feeds
/v1/feedsReturns all available feeds with their tier requirements, delivery cadence, and descriptions.
Simulate
Replay any historical session against your registered webhooks. Currently supports F1 sessions back to 2018.
Start a simulation
/v1/simulate| Field | Type | Description |
|---|---|---|
sessionId | string (required) | Session ID from GET /v1/events. Format: {year}-{circuit}-{session}, e.g. 2024-british-r1. |
speed | string (optional) | "1x" | "5x" | "10x". Default: "1x". |
Poll simulation status
/v1/simulate/:idCancel a simulation
/v1/simulate/:idEvents
/v1/eventsReturns the race calendar for all supported sports with sessions and their statuses. Currently returns F1 season data. Use this to get sessionId values for the Simulate endpoint, and to detect when live sessions are starting.
Usage
Delivery statistics for the authenticated client. All usage data resets at the start of each calendar month.
Summary
/v1/usage| Field | Type | Description |
|---|---|---|
deliveryCount | number | Total webhook deliveries in the current billing window. |
successCount | number | Deliveries that received a 2xx response from your endpoint. |
failureCount | number | Deliveries that received a non-2xx response or timed out. |
windowStart | string | ISO 8601 timestamp for the start of the current billing window. |
Breakdown by feed
/v1/usage/by-feedReturns per-feed delivery counts. Useful for understanding which feeds are generating the most traffic.
| Field | Type | Description |
|---|---|---|
byFeed[].feedId | string | Feed identifier. |
byFeed[].deliveryCount | number | Total deliveries for this feed in the current window. |
Latency percentiles
/v1/usage/latencyReturns p50, p95, and p99 delivery latency per feed, measured from when the F1 event was detected to when your endpoint acknowledged it.
| Field | Type | Description |
|---|---|---|
byFeed[].feedId | string | Feed identifier. |
byFeed[].p50 | number | Median delivery latency in milliseconds. |
byFeed[].p95 | number | 95th percentile latency in milliseconds. |
byFeed[].p99 | number | 99th percentile latency in milliseconds. |
byFeed[].sampleCount | number | Number of deliveries included in the sample. |
Error codes
All error responses return a JSON body with a message field describing the error.