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

# Update Webhook

> Update an existing webhook subscription.

<Note>
  Retrieve your API Key from your [VozAgent Dashboard](https://app.vozagent.ai/settings/api).
</Note>

## Path parameters

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

## Body parameters

All fields are optional. Only include the fields you want to change.

<ParamField body="name" type="string">
  Update the webhook display name.
</ParamField>

<ParamField body="url" type="string">
  Update the HTTPS endpoint URL to receive webhook events.
</ParamField>

<ParamField body="events" type="string[]">
  Replace the list of event types to subscribe to.
</ParamField>

<ParamField body="isActive" type="boolean">
  Enable or disable the webhook. Set to `false` to pause event delivery without deleting the webhook.
</ParamField>

## Available Events

| Event                     | Description                       |
| ------------------------- | --------------------------------- |
| `contact.created`         | New contact created.              |
| `call.started`            | Call initiated.                   |
| `call.completed`          | Call ended.                       |
| `lead.qualified`          | Lead marked as qualified.         |
| `appointment.booked`      | Appointment booked during a call. |
| `appointment.rescheduled` | Appointment rescheduled.          |

## Response

Returns the updated webhook object. Status code: `200`.

<RequestExample>
  ```bash theme={null}
  curl -X PATCH https://api.vozagent.ai/v1/webhooks/wh-a1b2c3d4... \
    -H "Authorization: Bearer <token>" \
    -H "Content-Type: application/json" \
    -d '{
      "events": ["call.completed", "appointment.booked"],
      "isActive": true
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "id": "wh-a1b2c3d4-e5f6-a7b8",
    "name": "My Webhook",
    "url": "https://yourapp.com/webhooks",
    "events": ["call.completed", "appointment.booked"],
    "is_active": true,
    "created_at": "2024-01-15T12:00:00Z",
    "updated_at": "2024-01-16T08:30:00Z"
  }
  ```
</ResponseExample>
