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

# Update Webhook

> Updates a webhook endpoint URL, event subscriptions, or active state

Available on agency plans. The API token must belong to the agency owner.

Only the fields you send are changed. Changing the URL or events keeps the signing secret. Setting `active` to `false` stops deliveries without deleting the endpoint or its history; queued retries for earlier events are marked as not sent while it is inactive.

## Path Parameters

| Name          | Type   | Description            |
| ------------- | ------ | ---------------------- |
| webhook\_id\* | String | The ID of the webhook. |

## Headers

| Name              | Type   | Description                                                                                       |
| ----------------- | ------ | ------------------------------------------------------------------------------------------------- |
| Accept\*          | String | application/json                                                                                  |
| Authorization\*   | String | Bearer {api_token}                                                                                |
| Content-Type\*    | String | application/json                                                                                  |
| Idempotency-Key\* | String | A unique key for this request. Retrying with the same key and body returns the original response. |

## Body Parameters

| Name   | Type    | Description                                            |
| ------ | ------- | ------------------------------------------------------ |
| url    | String  | The HTTPS endpoint to deliver events to.               |
| events | Array   | Event types to subscribe to, or `null` for all events. |
| active | Boolean | Whether deliveries are enabled.                        |

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH "https://api.sitespeak.ai/v1/agency/webhooks/{webhook_id}" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer YOUR_API_TOKEN" \
    -H "Content-Type: application/json" \
    -H "Idempotency-Key: webhook-disable-1" \
    -d '{
      "active": false
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.sitespeak.ai/v1/agency/webhooks/{webhook_id}',
    {
      method: 'PATCH',
      headers: {
        'Accept': 'application/json',
        'Authorization': 'Bearer YOUR_API_TOKEN',
        'Content-Type': 'application/json',
        'Idempotency-Key': 'webhook-disable-1'
      },
      body: JSON.stringify({ active: false })
    }
  );

  const data = await response.json();
  console.log(data);
  ```
</RequestExample>

## Response

<Tabs>
  <Tab title="200 Success">
    ```json theme={null}
    {
      "webhook": {
        "id": "4e1d795f-16b5-412a-b324-5f34779829a7",
        "team_id": "92754e3f-c05a-401e-9436-112990d0ce04",
        "url": "https://yourapp.com/webhooks/sitespeak",
        "events": null,
        "active": false,
        "created_at": "2026-08-18T11:41:52.000000Z",
        "updated_at": "2026-08-18T11:50:12.000000Z"
      }
    }
    ```
  </Tab>

  <Tab title="404 Not Found">
    ```json theme={null}
    {
      "message": "Not found."
    }
    ```
  </Tab>
</Tabs>
