Webhooks
Subscribe to real-time events like link clicks and lead captures.
Create a Webhook
Endpoint: POST /v1/webhooks
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
url | String | Yes | Destination URL for POST payloads. |
events | Array | Yes | ['link_click', 'lead_captured', 'link_created'] |
provider | String | No | generic, slack, lark, google_chat |
Example
curl -X POST https://qubitl.ink/api/v1/webhooks \
-H "x-api-key: sk_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"url": "https://hooks.slack.com/services/...",
"events": ["lead_captured"],
"provider": "slack",
"isGlobal": true
}'
Payload Examples
Generic (Default)
{
"event": "lead_captured",
"data": {
"name": "Jane Doe",
"email": "jane@example.com"
},
"timestamp": "2024-03-20T10:00:00Z"
}
Discord/Slack
When provider: "slack", the payload is formatted as a text message:
{
"text": "New Lead Captured: Jane Doe (jane@example.com)"
}
Security
Verify the x-qubit-signature header using your webhook secret and HMAC SHA256.