← Developers
Webhooks
Receive real-time HTTP callbacks when events happen in your account.
How Webhooks Work
- Configure a webhook URL in your organization settings
- Select which events to subscribe to
- LinkShor sends a POST request to your URL when events occur
- Your server responds with 200 to acknowledge receipt
Webhooks that fail (non-2xx response) are retried up to 3 times with exponential backoff.
Available Events
| Event |
Description |
link.created |
A new short link was created |
link.clicked |
A short link was clicked/visited |
qr.scanned |
A QR code was scanned (click via QR referrer) |
domain.verified |
A custom domain was verified successfully |
Payload: link.created
{
"event": "link.created",
"timestamp": "2025-01-15T10:30:00Z",
"data": {
"id": 42,
"short_url": "https://yourdomain.com/abc123",
"url": "https://example.com/page",
"alias": "abc123",
"created_by": "user@example.com"
}
}
Payload: link.clicked
{
"event": "link.clicked",
"timestamp": "2025-01-15T12:45:00Z",
"data": {
"link_id": 42,
"short_url": "https://yourdomain.com/abc123",
"country": "US",
"device": "mobile",
"browser": "Chrome",
"referrer": "https://twitter.com"
}
}
Verifying Webhooks
Each webhook includes a X-LinkShor-Signature header containing an HMAC-SHA256 signature of the payload using your organization secret key.
$signature = hash_hmac('sha256', $payload, $orgSecretKey);
$isValid = hash_equals($signature, $headerSignature);