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

# Update Webhook Endpoint

> Change a webhook endpoint's URL, event subscription, or active state.

Updates a webhook endpoint. Send any subset of the fields below.

## Path Parameters

<ParamField path="endpoint_id" type="string" required>
  The endpoint's id.
</ParamField>

## Body Parameters

<ParamField body="url" type="string">New HTTPS URL (max 2000 chars, public host).</ParamField>
<ParamField body="events" type="array">New event subscription list (see [supported events](/api-reference/v2/webhooks/list-endpoints)).</ParamField>
<ParamField body="active" type="boolean">Enable or disable delivery to this endpoint.</ParamField>

## Examples

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH https://api.tracklysms.com/api/v2/webhooks/66b0f7c84a1d4b2e9c3a1f2e \
    -H "X-Api-Key: trk_your_api_key" \
    -H "Content-Type: application/json" \
    -d '{ "events": ["message.delivered", "message.failed", "message.reply", "contact.opted_out"], "active": true }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 — Updated theme={null}
  {
    "id": "66b0f7c84a1d4b2e9c3a1f2e",
    "accountId": 1042,
    "url": "https://hooks.bizinga.com/trackly",
    "events": ["message.delivered", "message.failed", "message.reply", "contact.opted_out"],
    "active": true,
    "updatedAt": "2026-07-26T16:00:00Z"
  }
  ```
</ResponseExample>

## Error Codes

| HTTP Status | Error Code          | Description                              |
| ----------- | ------------------- | ---------------------------------------- |
| 400         | `validation_failed` | The URL or events list is invalid.       |
| 404         | `not_found`         | No endpoint with that id on the account. |
