# Update a webhook

`PATCH /v1/webhooks/{id}`

Requires an API key with the `webhooks:write` scope. [About keys and scopes](/docs/api/authentication)

Change the URL or events, or set `status` to `paused` or `active`. A paused or platform-disabled webhook receives no new events; its pending deliveries wait and resume when it is active again.

## Path parameters

- `id` (string, required, uuid)

## Request body

- `url` (string, optional, uri, up to 2000 characters) — The HTTPS endpoint that receives deliveries; it must resolve to a public host.
- `events` (string[], optional, at least 1 item, at most 14 items) — Event types to receive, or `["*"]` alone for every event, including future ones.
- `status` (string, optional, one of `active`, `paused`) — `paused` stops deliveries. `active` resumes them, and also re-enables a webhook the platform disabled.

## Returns

Returns `200 OK` with a `Webhook` in `data`. Otherwise returns an error; [Errors](/docs/api/errors) lists every code and which to retry.

- `id` (string, required, uuid)
- `url` (string, required, uri)
- `events` (string[], required) — The event types it receives.
- `source` (string | null, required, one of `zapier`, `make`, `n8n`, `http_api`) — The integration that created it; null when created directly.
- `status` (string, required, one of `active`, `paused`, `disabled`) — `disabled` is set only by the platform; `active` re-enables it.
- `previousSecretExpiresAt` (string | null, required, date-time) — Until when the replaced secret still signs requests after a rotation.
- `circuitOpenUntil` (string | null, required, date-time) — While set and in the future, deliveries to this endpoint wait: it failed five requests in a row. The next request after it is a probe; a success clears it.
- `createdAt` (string, required, date-time)

## Example

```bash
curl -X PATCH https://api.kirora.io/v1/webhooks/018f2a4e-6b1c-7d3e-9f40-37386ae05a6b \
  -H "Authorization: Bearer $KIRORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "events": [
      "*"
    ],
    "status": "active"
  }'
```

Response `200`:

```json
{
  "data": {
    "id": "018f2a4e-6b1c-7d3e-9f40-37386ae05a6b",
    "url": "https://example.com",
    "events": [
      "*"
    ],
    "source": "zapier",
    "status": "active",
    "previousSecretExpiresAt": "2030-03-14T09:30:00Z",
    "circuitOpenUntil": "2030-03-14T09:30:00Z",
    "createdAt": "2030-03-14T09:30:00Z"
  }
}
```
