Skip to main content
Search...C
Webhooks

Update Webhook

Updates an existing webhook endpoint. You can modify the URL, events, description, or active status. Only the fields you include in the request body will be updated.

Endpoint

PATCH/api/v1/webhooks/:id

Path Parameters

NameTypeDescription
idrequiredstringThe unique identifier of the webhook to update

Request Body

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

NameTypeDescription
urlstringThe URL that will receive webhook events
eventsstring[]Array of event types to subscribe to
descriptionstringDescription for this webhook
activebooleanWhether the webhook is active

Response

Returns the updated webhook object.

Response Schema
{
  "id": "wh_abc123",
  "url": "https://yourapp.com/webhooks/adbuy-v2",
  "events": ["lead.created", "lead.updated", "lead.converted"],
  "description": "Updated webhook endpoint",
  "active": true,
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-16T14:20:00Z"
}

Example

cURL
curl -X PATCH "https://api.adbuy.ai/api/v1/webhooks/wh_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://yourapp.com/webhooks/adbuy-v2",
    "events": ["lead.created", "lead.updated", "lead.converted"]
  }'