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

# Create webhook

`POST /webhooks`

Create a webhook endpoint. The signing secret is returned only once.

## Headers

- `Idempotency-Key` string, required
- `X-Agent-ID` string, nullable
- `X-Instance-ID` string, nullable

## Request body

- object
  - `data` object, required
    - `attributes` object, required
      - `url` string, uri, required — Webhook endpoint URL.
      - `description` string — Webhook description.
      - `enabledEvents` string[], required — Event types to subscribe to; use "*" to subscribe to all event types.
      - `tags` object — Tags applied to this webhook.

## Response `201`

Successful Response

- object
  - `data` object, required
    - `type` 'webhook', required
    - `id` string, required — Webhook ID (whk_*).
    - `attributes` object, required
      - `url` string, uri, required — Webhook endpoint URL.
      - `description` string, required — Webhook description.
      - `status` 'ENABLED' | 'DISABLED', required — Webhook status.
      - `enabledEvents` string[], required — Event types this webhook listens to.
      - `tags` object, required — Metadata visible to anyone who can read the resource.
      - `createdAt` string, date-time, required — When this webhook was created.
      - `updatedAt` string, date-time, required — When this webhook was last updated.
      - `signingSecret` string, required — Webhook signing secret. Returned only once.
    - `relationships` object, required
      - `party` object, required — Party that owns the webhook.
        - `data` object, required — Related resource identifier.
          - `type` 'party', required
          - `id` string, required

## Other responses

- `400` — Validation Error
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found. Returned when the resource does not exist, or when it exists but is not accessible to your account. The two cases are intentionally indistinguishable, so that resource IDs cannot be enumerated by probing.
- `409` — Conflict
- `422` — Validation Error
- `428` — Precondition Required
- `429` — Too Many Requests
- `500` — Internal Server Error
- `501` — Not Implemented
- `502` — Bad Gateway
- `503` — Service Unavailable

---

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