Request
Path Parameters
The webhook’s unique ID (UUID)
Authorization: Bearer wbk_your_api_key_here
Content-Type: application/json
Requires an API key with the webhooks:write permission. All body fields are optional — only include the fields you want to change.
Body Parameters
New HTTPS target URL. Must start with https:// and not resolve to a private IP.
Replacement array of event type strings. This replaces the full list — it is not merged. To remove an event, send the array without it.
Pause (false) or resume (true) deliveries without changing configuration.
Update the human-readable description.
Response
Current subscribed events
Whether deliveries are enabled
ISO 8601 timestamp of this update
The signing secret does not change on update. To rotate the secret, delete and recreate the webhook.
curl -X PATCH https://data.leadlex.com/functions/v1/api-gateway/v1/webhooks/7f3c4d2a-1b8e-4a9c-9d6f-2e5b8c7a1f3d \
-H "Authorization: Bearer wbk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"events": ["contact.created", "contact.updated", "deal.updated"],
"active": true
}'
Example Response
{
"data": {
"webhook": {
"id": "7f3c4d2a-1b8e-4a9c-9d6f-2e5b8c7a1f3d",
"url": "https://example.com/leadlex/webhook",
"events": ["contact.created", "contact.updated", "deal.updated"],
"description": "Production CRM sync",
"active": true,
"updated_at": "2026-04-17T14:30:00Z"
}
}
}
Errors
| Status | Code | Description |
|---|
| 400 | invalid_url | URL is not HTTPS, malformed, or resolves to a private IP |
| 400 | invalid_events | One or more event names are not recognized |
| 401 | invalid_key | Invalid or expired API key |
| 403 | insufficient_permissions | Missing webhooks:write permission |
| 404 | webhook_not_found | No webhook with this ID in your workspace |
| 429 | rate_limited | Rate limit exceeded |