---
title: "Create Webhook"
method: POST
path: "/v1/webhooks"
tags: ["Webhooks"]
---

# Create Webhook

`POST /v1/webhooks`

## Request

- Base URL: `https://api.racehooks.io`
- URL: `https://api.racehooks.io/v1/webhooks`
- Auth: API key in header `Authorization`

Create a webhook endpoint subscribed to one or more feeds. Provide a single `feedId` (legacy), a `feedIds` array (supports `*` and `analytics.*` globs), or a `subscriptions` array with per-feed filters. All feeds share one signing secret. Returns the secret once.

## Request body

- object
  - `webhookUrl` string: Public HTTPS URL to deliver payloads to
  - `webhookMethod` 'post' | 'put'
  - `seriesId` string
  - `feedId` string: Single feed (legacy single-feed form)
  - `feedIds` string[]: Feeds to subscribe; supports "*" (all in-tier) and "analytics.*" group globs.
  - `subscriptions` object[]: Per-feed subscriptions with optional per-feed filters.
    - `feedId` string, required
    - `filters` object
      - `drivers` string[]
      - `driverNumbers` string[]
      - `constructors` string[]
      - `positions` object
        - `min` integer
        - `max` integer
      - `eventTypes` string[]
  - `filters` object: Endpoint-wide default filters, merged under each feed's own filters.
    - `drivers` string[]
    - `driverNumbers` string[]
    - `constructors` string[]
    - `positions` object
      - `min` integer
      - `max` integer
    - `eventTypes` string[]

## Response `200`

Default Response

- object
  - `data` object
    - `webhookId` string
    - `webhookUrl` string
    - `webhookMethod` string
    - `subscriptions` object[]
      - `feedId` string
      - `seriesId` string
      - `filters` object
      - `active` boolean
      - `subscriptionTier` string
      - `consecutiveFailures` integer
      - `autoDisabledAt` string, nullable
      - `createdAt` string, date-time
      - `updatedAt` string, date-time
    - `webhook` object
      - `webhookId` string
      - `feedId` string
      - `seriesId` string
      - `webhookUrl` string
      - `webhookMethod` string
      - `active` boolean
      - `subscriptionTier` string
      - `filters` object
      - `consecutiveFailures` integer
      - `autoDisabledAt` string, nullable
      - `createdAt` string, date-time
      - `updatedAt` string, date-time
    - `webhookSecret` string
    - `tier` string

## Other responses

- `400`: Invalid request or private webhookUrl
- `401`: Missing or invalid Bearer token
- `402`: Endpoint or feeds-per-endpoint limit reached for current tier
- `404`: feedId not found
- `422`: One or more requested feeds are invalid for your tier — nothing was created

---

[API](https://skmtc.dev/racehooks/apis/racehooks-api.md) · [All operations](https://skmtc.dev/racehooks/apis/racehooks-api/llms.txt) · [OpenAPI document](https://skmtc.dev/racehooks/apis/racehooks-api/revisions/2335b73f46e4?raw)
