← Back to API Reference

PATCH /webhooks/{webhook_id}

Update Webhook

Update a configured webhook endpoint.

Request (cURL)

curl -X PATCH "http://localhost:8080/v1/webhooks/wh_123" \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "enabled": false,
  "secret": "whsec_rotated_secret"
}'

Response Example

{
  "data": {
    "id": "wh_123",
    "url": "https://example.com/webhooks/mail",
    "enabled": false,
    "events": [
      "email.sent",
      "email.delivered"
    ],
    "created_at": "2026-06-09T21:22:03.430Z",
    "updated_at": "2026-06-09T21:22:03.430Z",
    "has_secret": true
  }
}

Request Body Example

{
  "enabled": false,
  "secret": "whsec_rotated_secret"
}