Developer beta

Receive your Linka Factory events

Send clicks, matched routing rules and short-link events to internal tools, Make, Zapier, a CRM or a reporting stack. Visitor redirects stay first: webhooks are delivered in the background.

Beta status: the UI, signature and retries are operational. Events and fields may still evolve before full stabilization; verify your integrations after each new event type.

Delivered without slowing clicks

The visitor click is served first. Webhook delivery is logged and processed in the background.

Every request is signed

Each POST includes an HMAC SHA-256 signature in X-Linka-Factory-Signature.

Retries on failure

Network errors and non-2xx HTTP responses are retried automatically, with a visible log in Settings.

Available events

campaign.click.recorded

A click was served by a campaign.

campaign.routing_rule.matched

An advanced routing rule was applied before distribution.

short_link.click.recorded

A click was served by a Linka Factory short link.

Guardrails

  • Public HTTPS endpoint only, port 443.
  • Localhost, private IPs, URL credentials and internal Linka Factory domains are rejected.
  • The full secret is shown once. To replace it, create a new endpoint and revoke the old one.
  • A UI confirmation never replaces server-side signature verification.
Payload JSON
{
  "id": "evt_campaign_click_recorded_01hq...",
  "type": "campaign.click.recorded",
  "created_at": "2026-05-01T17:40:00.000Z",
  "account_id": "acc_...",
  "data": {
    "accountId": "acc_...",
    "timestamp": "2026-05-01T17:40:00.000Z",
    "campaignId": "cmp_...",
    "urlId": "url_...",
    "servedUrl": "https://example.com/landing-a",
    "routingRuleId": "rule_...",
    "routingRuleLabel": "France mobile",
    "country": "FR",
    "deviceType": "mobile",
    "browserFamily": "chrome",
    "platformFamily": "android",
    "sourceSite": "newsletter",
    "refererHost": "example.com",
    "ipMasked": "203.0.113.0",
    "suspicious": false
  }
}

Verify the signature

The signature is computed from timestamp dot raw body. Keep the exact received body before JSON parsing.

import crypto from "node:crypto"

export function verifyLinkaFactoryWebhook({ rawBody, signatureHeader, secret }) {
  if (!Buffer.isBuffer(rawBody) && typeof rawBody !== "string") return false
  if (typeof signatureHeader !== "string" || typeof secret !== "string" || !secret) return false
  const match = /^t=([0-9]{1,12}),v1=([a-fA-F0-9]{64})$/.exec(signatureHeader)
  if (!match) return false
  const timestamp = match[1]
  const ageSeconds = Math.abs(Math.floor(Date.now() / 1000) - Number(timestamp))
  if (ageSeconds > 300) return false

  const expected = crypto
    .createHmac("sha256", secret)
    .update(timestamp + ".")
    .update(rawBody)
    .digest()
  const received = Buffer.from(match[2], "hex")

  return received.length === expected.length && crypto.timingSafeEqual(expected, received)
}

This example allows five minutes of clock skew. After verifying the signature, deduplicate the JSON id in your database: a unique constraint and the business operation must share one transaction. A previously processed event should receive a 2xx response without repeating its effects. The signature alone does not prevent replay within this window.

Delivery

How Linka Factory retries

An HTTP 2xx status marks the delivery as sent. Other statuses, timeouts and network errors move to retry.

After a failure, the scheduled delays before retries are 5 minutes, 30 minutes, then 2 hours and another 2 hours, with up to 5 attempts including the initial delivery. Actual delivery time depends on queue processing.

The latest deliveries log shows status, attempt count, HTTP code and a response preview for quick debugging.

Next step

Connect your clicks to your stack.