---
title: "Update a webhook"
method: PATCH
path: "/v1/projects/{project_id}/webhooks/{webhook_id}"
tags: ["Webhooks"]
---

# Update a webhook

`PATCH /v1/projects/{project_id}/webhooks/{webhook_id}`

## Request

- Base URL: `https://api.naturali.ai`
- URL: `https://api.naturali.ai/v1/projects/{project_id}/webhooks/{webhook_id}`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.naturali.ai/authorize`, token URL `https://api.naturali.ai/token`, scopes: `mcp:access`)

Change the destination, the subscription, the label, the signing secret or whether deliveries are attempted at all. At least one field is required. A `secret` sent here is never returned.
Setting `active: false` is the reversible half of `DELETE`: deliveries stop, the endpoint and its history stay. It is what to reach for while a receiver is being repaired.

## Request body

- WebhookUpdate: At least one field is required.
  - `url` string, uri
  - `events` string[]: Which events this endpoint receives. Each entry is an exact type (`generation.completed`), a resource wildcard (`generation.*`), or `*` for everything. A bare resource name (`generation`) matches nothing and is rejected.
  - `description` string, nullable
  - `active` boolean
  - `secret` string: A signing key of your choosing, 32 to 256 characters with no whitespace. Omit it on create to have one generated.

## Response `200`

Webhook updated.

- Webhook
  - `id` string, required: Public webhook ID (whk_ prefix).
  - `project_id` string, required
  - `url` string, uri, required: Where deliveries are POSTed.
  - `events` string[], required: Which events this endpoint receives. Each entry is an exact type (`generation.completed`), a resource wildcard (`generation.*`), or `*` for everything. A bare resource name (`generation`) matches nothing and is rejected.
  - `description` string, nullable, required: Operator-facing label.
  - `active` boolean, required: Whether deliveries are attempted.
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `400`: The request was malformed or failed validation.
- `401`: Missing or invalid credentials.
- `404`: The resource does not exist (existence is not leaked).

---

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