Update Webhook
Updates one or more fields on an existing webhook endpoint. Only the provided fields are modified; all others remain unchanged.
PATCH
/v1/webhooks/{webhook_id} webhooks:write Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
webhook_id | string | Yes | The unique identifier of the webhook. |
Request Body
All fields are optional. Only include the fields you want to update.
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | No | New HTTPS URL for the webhook endpoint. |
events | string[] | No | Updated list of event types to subscribe to. Replaces the existing list. |
description | string | No | Updated human-readable description. |
enabled | boolean | No | Set to false to pause delivery, or true to re-enable. |
Request Examples
curl -X PATCH https://xqr.co/api/v1/webhooks/wh_a1b2c3d4-e5f6-7890-abcd-ef1234567890 \ -H "Authorization: Bearer xqr_pk_a1b2c3d4.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{ "events": ["link.created", "link.scanned", "link.deleted"], "description": "All link lifecycle events" }'const webhookId = "wh_a1b2c3d4-e5f6-7890-abcd-ef1234567890";
const response = await fetch(`https://xqr.co/api/v1/webhooks/${webhookId}`, { method: "PATCH", headers: { Authorization: "Bearer xqr_pk_a1b2c3d4.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "Content-Type": "application/json", }, body: JSON.stringify({ events: ["link.created", "link.scanned", "link.deleted"], description: "All link lifecycle events", }),});
const { data } = await response.json();console.log(data.events); // ["link.created", "link.scanned", "link.deleted"]import httpx
webhook_id = "wh_a1b2c3d4-e5f6-7890-abcd-ef1234567890"
response = httpx.patch( f"https://xqr.co/api/v1/webhooks/{webhook_id}", headers={ "Authorization": "Bearer xqr_pk_a1b2c3d4.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "Content-Type": "application/json", }, json={ "events": ["link.created", "link.scanned", "link.deleted"], "description": "All link lifecycle events", },)
data = response.json()["data"]print(data["events"]) # ["link.created", "link.scanned", "link.deleted"]Response
200 OK
The updated webhook object.
{ "data": { "id": "wh_a1b2c3d4-e5f6-7890-abcd-ef1234567890", "url": "https://example.com/webhooks/xqr", "events": ["link.created", "link.scanned", "link.deleted"], "description": "All link lifecycle events", "enabled": true, "failure_count": 0, "created_at": "2026-03-21T14:30:00Z", "updated_at": "2026-03-21T15:45:00Z" }, "meta": { "request_id": "req_1e2f3a4b5c6d7e89", "rate_limit": { "limit": 600, "remaining": 596, "reset": 1742572800 } }}Was this page helpful?
Thanks for your feedback!