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

# Update Webhook

> Update webhook configuration

## Description

Update the URL or events of an existing webhook.

## Parameters

<ParamField path="id" type="string" required>
  Unique webhook ID.
</ParamField>

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

<ParamField body="events" type="string[]">
  Array of new events.
</ParamField>

## Response

<ResponseField name="id" type="string">
  Updated webhook ID.
</ResponseField>

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PATCH https://api.usesendly.app/v1/webhooks/webhook_123 \
    -H "Authorization: Bearer se_your_api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "url": "https://yourdomain.com/webhooks/sendly-v2"
    }'
  ```

  ```javascript SDK theme={null}
  await client.webhooks.update('webhook_123', {
    url: 'https://yourdomain.com/webhooks/sendly-v2',
    events: [
      'email.delivered',
      'email.bounced',
      'email.opened',
      'email.clicked'
    ]
  })
  ```

  ```javascript SMTP theme={null}
  import { Sendly } from '@sendlyapp/sdk'

  const client = new Sendly()
  await client.webhooks.update('webhook_123', {
    events: ['email.delivered', 'email.failed']
  })
  ```
</CodeGroup>

***

Need help? Contact [support@usesendly.app](mailto:support@usesendly.app)
