> ## Documentation Index
> Fetch the complete documentation index at: https://docs.drin.run/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a webhook

> PATCH /v1/webhooks/{id} — pause, resume, repoint, or re-subscribe an endpoint without rotating its signing secret.

A partial update. Pause or resume an endpoint, change where it points, or change which events it receives — all without rotating the signing secret.

**`PATCH /v1/webhooks/{id}`**

## Path parameters

<ParamField body="id" type="string" required>
  The webhook endpoint id to update.
</ParamField>

## Body

Send any subset of the following. Omitted fields are left unchanged.

<ParamField body="url" type="string">
  New HTTPS endpoint to deliver events to.
</ParamField>

<ParamField body="enabled" type="boolean">
  `false` pauses deliveries; `true` resumes them.
</ParamField>

<ParamField body="eventTypes" type="string[]">
  Replace the subscribed event list. See the full set on [create](/api-reference/webhooks/create).
</ParamField>

<Note>
  **The secret survives.** Updating an endpoint keeps its `signingSecret`. To rotate the secret, delete the endpoint and create a new one.
</Note>

## Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PATCH https://api.drin.run/v1/webhooks/wh_3kQ9p2 \
    -H "Authorization: Bearer $DRIN_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{ "enabled": false }'
  ```

  ```typescript Node.js theme={null}
  import { DrinClient } from "@drin00/sdk";

  const drin = new DrinClient({ apiKey: process.env.DRIN_API_KEY });

  // Pause deliveries — secret is preserved.
  await drin.webhooks.update("wh_3kQ9p2", { enabled: false });

  // Repoint and re-subscribe in one call.
  await drin.webhooks.update("wh_3kQ9p2", {
    url: "https://example.com/hooks/v2",
    eventTypes: ["delivery", "bounce", "complaint", "open", "click"],
  });
  ```
</CodeGroup>

## Response

Returns `200 OK` with the updated endpoint (secret redacted). An unknown id returns `404 not_found`.

```json 200 OK theme={null}
{
  "id": "wh_3kQ9p2",
  "url": "https://example.com/hooks/drin",
  "enabled": false,
  "eventTypes": ["delivery", "bounce", "complaint"],
  "signingSecret": ""
}
```
