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

# Create a webhook

`POST /webhooks`

Registers a new HTTPS endpoint to receive event deliveries. OMS generates
a signing secret (`whsec_` prefix) that is returned **once** in this
response and never again - store it in your secrets manager immediately.
The endpoint starts receiving deliveries immediately after creation.

## Headers

- `Idempotency-Key` string, required

## Request body

- WebhookCreateRequest
  - `url` string, required — HTTPS endpoint URL. HTTP is only accepted in local/sandbox mode.
  - `events` string[] — Event types to subscribe to. Omit the field, pass `[]`, `["*"]`, or `["ALL"]` to subscribe to all events. Specific event type strings must match the catalog in the webhook delivery documentation.

## Response `201`

The request has succeeded and a new resource has been created as a result.

- Webhook
  - `id` string — Public TypeID, e.g. `txn_01h455vb4pex5vsknk084sn02q`; legacy UUID suffixes are accepted until non-v7 rows are retired.
  - `object` 'webhook' — Resource type discriminator. Always `"webhook"`.
  - `url` string — HTTPS endpoint that OMS delivers event payloads to.
  - `secret` string — Signing secret used to verify the `Webhook-Signature` header on incoming deliveries. Uses the `whsec_` prefix (32 cryptographically random bytes, hex-encoded). **Returned only on creation** - it cannot be retrieved afterward. Store it in your secrets manager immediately.
  - `events` string[] — Event types this endpoint subscribes to. An empty array means the endpoint receives all event types (wildcard). See the event catalog in the webhook delivery documentation for the full list of valid values.
  - `enabled` boolean — Whether OMS is actively delivering events to this endpoint. Set to `false` to pause deliveries without deleting the endpoint. OMS also sets this to `false` automatically if the endpoint returns `410 Gone`.
  - `complianceOnly` boolean, required — When true, this endpoint receives compliance-only events (e.g. underReview) that are excluded from all regular partner webhooks (AML no-tipping-off). Can only be set via the admin API.
  - `status` 'active' | 'disabled'
  - `createdAt` string, date-time — ISO 8601 UTC timestamp of when the webhook was registered.

---

[API](https://skmtc.net/polygon-technology/apis/polygon-oms-public-api.md) · [All operations](https://skmtc.net/polygon-technology/apis/polygon-oms-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/polygon-technology/polygon-oms-public-api/revisions/18fdaebf64e5/schema)
