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

# Update Webhook

> Update an existing webhook's URL, events, or active status.

## Path Parameters

<ParamField path="webhook_id" type="string" required>
  The unique identifier of the webhook.
</ParamField>

## Request Body

All fields are optional.

<ParamField body="url" type="string">
  New endpoint URL.
</ParamField>

<ParamField body="events" type="array">
  Updated list of event types to subscribe to.
</ParamField>

<ParamField body="isActive" type="boolean">
  Enable or disable the webhook.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH "https://api.foxreach.io/api/v1/webhooks/cwh_abc123" \
    -H "X-API-Key: otr_your_key" \
    -H "Content-Type: application/json" \
    -d '{
      "events": ["email.sent", "reply.received", "lead.created"],
      "isActive": true
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.patch(
      "https://api.foxreach.io/api/v1/webhooks/cwh_abc123",
      headers={"X-API-Key": "otr_your_key"},
      json={
          "events": ["email.sent", "reply.received", "lead.created"],
          "isActive": True
      }
  )
  data = response.json()
  ```

  ```typescript TypeScript theme={null}
  const response = await fetch(
      "https://api.foxreach.io/api/v1/webhooks/cwh_abc123",
      {
          method: "PATCH",
          headers: {
              "X-API-Key": "otr_your_key",
              "Content-Type": "application/json"
          },
          body: JSON.stringify({
              events: ["email.sent", "reply.received", "lead.created"],
              isActive: true
          })
      }
  );
  const data = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "data": {
      "id": "cwh_abc123",
      "url": "https://your-app.com/webhooks/outreach",
      "isActive": true,
      "events": ["email.sent", "reply.received", "lead.created"],
      "lastDeliveredAt": "2025-01-15T10:30:00",
      "consecutiveFailures": 0,
      "createdAt": "2025-01-01T10:00:00",
      "updatedAt": "2025-01-16T09:00:00"
    }
  }
  ```
</ResponseExample>

## Errors

| Status | Description                  |
| ------ | ---------------------------- |
| `404`  | Webhook not found            |
| `422`  | Invalid event types provided |

## Rate Limit

* **100 requests per minute, per API key.** Fixed 60-second window.
* Every response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` (unix epoch seconds).
* A `429` response includes a `Retry-After` header (seconds until the bucket resets).

For client-side patterns (`Retry-After`, exponential backoff, monitoring `X-RateLimit-Remaining`), see [Rate Limiting](/rate-limiting).
