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

# Update a Webhook Endpoint

> Updates a webhook endpoint's URL, events, or active state.

Requires the `webhooks:write` scope. Send only the fields you want to change.

### Path parameters

<ParamField path="id" type="string" required>
  The id of the webhook endpoint.
</ParamField>

### Body

<ParamField body="url" type="string">
  A new HTTPS URL for deliveries.
</ParamField>

<ParamField body="events" type="array[string]">
  Replace the events this endpoint is subscribed to. Must be a non-empty list of valid event names.
</ParamField>

<ParamField body="is_active" type="boolean">
  Enable or disable the endpoint. Setting `is_active: true` on a disabled endpoint **re-enables it and clears its failure state** (`disabled_reason`, `disabled_at`, and `consecutive_failures` are reset).
</ParamField>

### Response

Returns the updated endpoint. The `secret` is not returned.

<Snippet file="webhooks/endpoint-fields.mdx" />

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request PATCH 'https://api.audienceful.com/v2/webhooks/wYt3nKq8Zs4pLm9vRb2xJc' \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <your-api-key>' \
  --data-raw '{
      "events": ["person.created", "person.updated", "audience.member_added"],
      "is_active": true
  }'
  ```

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

  url = "https://api.audienceful.com/v2/webhooks/wYt3nKq8Zs4pLm9vRb2xJc"
  headers = {
      "Content-Type": "application/json",
      "X-Api-Key": "<your-api-key>",
  }
  payload = {
      "events": ["person.created", "person.updated", "audience.member_added"],
      "is_active": True,
  }

  response = requests.patch(url, headers=headers, json=payload)
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.audienceful.com/v2/webhooks/wYt3nKq8Zs4pLm9vRb2xJc", {
    method: "PATCH",
    headers: {
      "Content-Type": "application/json",
      "X-Api-Key": "<your-api-key>",
    },
    body: JSON.stringify({
      "events": [
        "person.created",
        "person.updated",
        "audience.member_added"
      ],
      "is_active": true
    }),
  });
  const data = await response.json();
  console.log(data);
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "wYt3nKq8Zs4pLm9vRb2xJc",
    "url": "https://example.com/webhooks/audienceful",
    "events": ["person.created", "person.updated", "audience.member_added"],
    "is_active": true,
    "disabled_reason": null,
    "disabled_at": null,
    "consecutive_failures": 0,
    "created_at": "2026-07-04T12:00:00Z",
    "updated_at": "2026-07-04T13:15:00Z"
  }
  ```
</ResponseExample>
