Skip to main content

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​

  1. Open Webhooks in the LinkLane app.
  2. Add your endpoint URL and pick the events you want.
  3. Copy the webhook's secret. You need it to check signatures.
  4. 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​

EventWhendata
link.createdA link is created, in the app, by the API or in bulk.The link object.
link.updatedA link is changed. Bulk edits don't send it.The updated link object.
link.deletedA link is deleted. Bulk deletes don't send it.{ "id": "<link id>" }
link.clickedA person clicks a link. Not sent for bots, or while your monthly tracked-click limit is used up.The click event (below).
testYou click Send test.{ "message": "This is a test webhook from LinkLane." }

Payload​

Every request has the same envelope: event, timestamp and data.

POST to your endpoint · link.clicked
{
"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 fieldDescription
idThe click id. With conversion tracking on, this is the ll_cid added to the destination.
deviceMobile, Tablet or Desktop.
countryTwo-letter country code, from the visitor's IP. LinkLane never stores the raw IP.
referrerThe referring host, or Direct.
sourceqr for a QR scan, link otherwise.
variantThe routing variant served, if the link uses smart routing.
is_uniquetrue 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.

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);

Delivery and retries​

  • LinkLane waits up to 10 seconds for your response. Any 2xx status 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 timestamp or the click's created_at if 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.

POST/api/webhooks
Auth
Dashboard session only
Plan
Pro and above

Body parameters​

NameTypeRequiredDescription
urlstringYesYour https:// endpoint.
eventsstring[]YesAt 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.

GET/api/webhooks
Auth
Dashboard session only
Plan
Pro and above
PATCH/api/webhooks/{webhook_id}
Auth
Dashboard session only
Plan
Pro and above

Changes url, events or active.

DELETE/api/webhooks/{webhook_id}
Auth
Dashboard session only
Plan
All plans
POST/api/webhooks/{webhook_id}/test
Auth
Dashboard session only
Plan
Pro and above

Sends a test event. A failed test doesn't count toward turning the webhook off.