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

# Create Webhook

`POST /webhooks`

Creates a webhook endpoint that receives event notifications via HTTP POST.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `api_version` 'v1' | 'v2' | 'v5' — The API version for this webhook. Defaults to `v2`.
  - `api_version_date` string, nullable — The dated API version (Api-Version-Date) to pin this webhook's payloads to. Only valid for `v1` webhooks. Omit to leave the webhook unpinned, tracking the current payload shape.
  - `child_resource_events` boolean — Whether to send events for child resources. For example, if the webhook is created for an account, enabling this sends events only from its connected accounts.
  - `enabled` boolean — Whether or not the webhook is enabled. Defaults to `true`.
  - `events` string[] — The events to send the webhook for, in dot form (for example `payment.succeeded`).
  - `resource_id` string, nullable — The account or app to create the webhook for. Defaults to the current account.
  - `url` string, required — The URL to send the webhook to.

## Response `200`

webhook created

- Webhook
  - `api_version` 'v1' | 'v2' | 'v5', required — The API version used to format payloads sent to this webhook endpoint.
  - `api_version_date` string, nullable, required — The dated API version (Api-Version-Date) that v1 payloads for this endpoint are pinned to: events serialize exactly like a REST read at this version (the native serializer where the resource has one). Null when unpinned — legacy (v2/v5) webhooks, and v1 webhooks on the legacy payload shape.
  - `child_resource_events` boolean, required — Whether events are sent for child resources. For example, if the webhook is on an account, enabling this sends events only from its connected accounts.
  - `consecutive_failures` integer, required — Number of consecutive deliveries whose first attempt to this endpoint failed since it last accepted one. Later retries of the same delivery do not increment it. Resets to `0` when a delivery succeeds or the webhook is re-enabled.
  - `created_at` string, required — When the webhook was created, as an ISO 8601 timestamp.
  - `disabled_at` string, nullable, required — When Whop automatically disabled this webhook, as an ISO 8601 timestamp. `null` unless the webhook was disabled by Whop; a webhook you disabled yourself has `enabled: false` and a `null` `disabled_at`.
  - `disabled_reason` 'delivery_failures' | 'null', nullable, required — Why Whop disabled this webhook. `delivery_failures` means every delivery failed for 3 days straight. `null` when `disabled_at` is `null`.
  - `enabled` boolean, required — Whether this webhook endpoint is currently active and receiving events.
  - `events` string[], required
  - `failing_since` string, nullable, required — When the current failure streak began, as an ISO 8601 timestamp. Unlike `last_failure_at`, this is set on the streak's first failed attempt, so it shows an endpoint that is failing right now. `null` when the endpoint is healthy.
  - `id` string, required — Webhook ID, prefixed `hook_`.
  - `last_failure_at` string, nullable, required — When a delivery to this endpoint most recently failed after exhausting retries, as an ISO 8601 timestamp. `null` if no delivery has ever failed.
  - `resource_id` string, required — ID of the resource (account or app) this webhook is attached to.
  - `testable_events` string[], required
  - `url` string, required — Destination URL where webhook payloads are delivered via HTTP POST.
  - `webhook_secret` string, nullable, required — Secret key used to sign webhook payloads for verification. Include this in your HMAC validation logic. Returned on the create response and to interactive dashboard sessions; `null` for API-key and OAuth callers on later reads.

## Other responses

- `400` — Invalid Parameters
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Resource not found

---

[API](https://skmtc.net/whop/apis/whop-api.md) · [All operations](https://skmtc.net/whop/apis/whop-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/whop/whop-api/versions/db0883548bc5/schema)
