Skip to content

Create Webhook

Registers a new webhook endpoint that will receive HTTP POST callbacks when subscribed events occur in the workspace.

POST /v1/webhooks
webhooks:write

Request Body

ParameterTypeRequiredDescription
urlstringYesThe HTTPS URL that will receive webhook payloads. Must use https://.
eventsstring[]YesArray of event types to subscribe to. Use "*" to receive all events.
descriptionstringNoA human-readable description for this webhook.

Valid Events

EventDescription
*Subscribe to all events.
link.createdA new short link was created.
link.updatedA short link was updated.
link.deletedA short link was deleted.
link.scannedA short link or QR code was scanned.
link.thresholdA link reached a scan count threshold.
bio.publishedA Link-in-Bio page was published.
bio.unpublishedA Link-in-Bio page was unpublished.
asset.uploadedA new asset upload was confirmed.
subscription.updatedThe workspace subscription/plan changed.
test.pingA test event for verifying webhook delivery.

Request Examples

Terminal window
curl -X POST https://xqr.co/api/v1/webhooks \
-H "Authorization: Bearer xqr_pk_a1b2c3d4.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/webhooks/xqr",
"events": ["link.created", "link.scanned"],
"description": "Production link events"
}'

Response

201 Created

The newly created webhook object.

{
"data": {
"id": "wh_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"url": "https://example.com/webhooks/xqr",
"events": ["link.created", "link.scanned"],
"description": "Production link events",
"enabled": true,
"failure_count": 0,
"created_at": "2026-03-21T14:30:00Z",
"updated_at": "2026-03-21T14:30:00Z"
},
"meta": {
"request_id": "req_8b9c0d1e2f3a4b56",
"rate_limit": {
"limit": 600,
"remaining": 599,
"reset": 1742572800
}
}
}

Was this page helpful?