Webhooks
A webhook sends an HTTPS POST to your server when something happens to your links. Each request is signed, so you can check it came from LinkLane.
PlanPro and above
Set up a webhook
- Open Webhooks in the LinkLane app.
- Add your endpoint URL and pick the events you want.
- Copy the webhook's secret. You need it to check signatures.
- Click Send test to receive a sample event.
Your URL must use https:// and must resolve to a public address. LinkLane refuses private, loopback and link-local hosts. You can add up to 20 webhooks.
Events
| Event | When | data |
|---|---|---|
link.created | A link is created, in the app, by the API or in bulk. | The link object. |
link.updated | A link is changed. Bulk edits don't send it. | The updated link object. |
link.deleted | A link is deleted. Bulk deletes don't send it. | { "id": "<link id>" } |
link.clicked | A person clicks a link. Not sent for bots, or while your monthly tracked-click limit is used up. | The click event (below). |
test | You click Send test. | { "message": "This is a test webhook from LinkLane." } |
Payload
Every request has the same envelope: event, timestamp and data.
{
"event": "link.clicked",
"timestamp": "2026-11-30T09:58:40.152000+00:00",
"data": {
"id": "a41f6c2e-8d3b-4e5a-9c70-1b2d3e4f5a6b",
"link_id": "6f1c2b9e-1d4a-4c39-9a51-0c7e8b2d4f10",
"code": "spring-sale",
"created_at": "2026-11-30T09:58:40.117000+00:00",
"device": "Mobile",
"os": "iOS",
"browser": "Safari",
"country": "US",
"referrer": "instagram.com",
"source": "link",
"variant": null,
"is_bot": false,
"is_unique": true
}
}
| Click field | Description |
|---|---|
id | The click id. With conversion tracking on, this is the ll_cid added to the destination. |
device | Mobile, Tablet or Desktop. |
country | Two-letter country code, from the visitor's IP. LinkLane never stores the raw IP. |
referrer | The referring host, or Direct. |
source | qr for a QR scan, link otherwise. |
variant | The routing variant served, if the link uses smart routing. |
is_unique | true for the visitor's first click on this link that day (UTC). |
Check the signature
Each request has an X-LinkLane-Signature header. It is the hex HMAC-SHA256 of the raw request body, keyed with your webhook's secret. Compute it yourself and compare in constant time. Reject the request if they differ.
Use the raw bytes. Parsing the JSON and serializing it again changes the bytes and breaks the check.
- Node.js
- Python
import crypto from "node:crypto";
import express from "express";
const app = express();
// express.raw keeps the exact bytes LinkLane signed.
app.post("/linklane", express.raw({ type: "application/json" }), (req, res) => {
const expected = crypto
.createHmac("sha256", process.env.LINKLANE_WEBHOOK_SECRET)
.update(req.body)
.digest("hex");
const given = req.get("X-LinkLane-Signature") || "";
const ok =
given.length === expected.length &&
crypto.timingSafeEqual(Buffer.from(given), Buffer.from(expected));
if (!ok) return res.status(401).end();
const { event, data } = JSON.parse(req.body);
if (event === "link.clicked") console.log(`click on ${data.code} from ${data.country}`);
res.status(200).end();
});
app.listen(3000);
import hashlib
import hmac
import os
from flask import Flask, abort, request
app = Flask(__name__)
SECRET = os.environ["LINKLANE_WEBHOOK_SECRET"].encode()
@app.post("/linklane")
def linklane_webhook():
raw = request.get_data() # the exact bytes LinkLane signed
expected = hmac.new(SECRET, raw, hashlib.sha256).hexdigest()
given = request.headers.get("X-LinkLane-Signature", "")
if not hmac.compare_digest(expected, given):
abort(401)
payload = request.get_json()
if payload["event"] == "link.clicked":
print("click on", payload["data"]["code"])
return "", 200
Delivery and retries
- LinkLane waits up to 10 seconds for your response. Any
2xxstatus counts as delivered. - After a failure, LinkLane tries once more 3 seconds later.
- After 10 failed deliveries in a row, the webhook is turned off. You get an in-app notification and the webhook shows as failing. Turn it back on in the app once your endpoint works.
- A successful delivery resets the failure count to 0.
- Deliveries can arrive out of order. Use
timestampor the click'screated_atif order matters.
Answer fast and do slow work later, for example in a queue. That keeps you inside the 10-second limit.
Dashboard endpoints
The app manages webhooks with these. They need a dashboard session.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Your https:// endpoint. |
events | string[] | Yes | At least one of link.created, link.updated, link.deleted, link.clicked. |
The response includes the webhook's secret, active, failure_count and last_triggered_at.
Changes url, events or active.
Sends a test event. A failed test doesn't count toward turning the webhook off.