link.update webhook event

Flyn sends link.update to your webhook URL when a link is changed with PATCH /api/links/:id or edited in the Flyn dashboard. From the API, the delivery carries the full link object after the change.

Plan needed

Creating a webhook needs Pro, Lifetime or Team. Pro is $12 a month, or $9 a month billed annually, and Lifetime is $249 once. Team means a teammate in a paying owner's workspace, with any role but viewer. On Free, POST /api/webhooks answers 403 with the code UPGRADE_REQUIRED. See pricing.

When link.update fires

  • PATCH /api/links/:id changes a link: its destination, slug, title, status or any other field. The flyn-sdk package and the MCP server's update_link tool use the same endpoint.
  • Someone edits a link in the Flyn dashboard.

It does not fire when:

  • Several links are moved to a folder at once in the dashboard. That bulk move sends no event.
  • A link is clicked. A click changes the link's counters but sends link.click, not link.update.
  • A link reaches its expiry date. Flyn has no expiry event.

Who receives it

The webhooks of the user who made the change. If a workspace owner or admin edits a teammate's link, their own webhooks receive the event, not the link creator's. Only webhooks that are active and subscribed to link.update receive it.

Payload from the API

From PATCH /api/links/:id, data is the full link object after the change. It does not list which fields changed, so compare it with the copy you hold.

link.update (API)
{
  "event": "link.update",
  "timestamp": 1790161200000,
  "data": {
    "id": "3f0c2a9e-7b1d-4c55-9a0e-2d8f1b6c4e11",
    "slug": "summer-sale",
    "url": "https://shop.example.com/sale-v2",
    "shortUrl": "https://flyn.co/summer-sale",
    "domain": "flyn.co",
    "title": "Summer sale",
    "clicks": 42,
    "botClicks": 3,
    "qrScans": 5,
    "totalClicks": 45,
    "status": "active",
    "tags": [
      "q3"
    ],
    "createdAt": "2026-09-23T10:00:00.123456+00:00",
    "expiresAt": null,
    "folderId": null,
    "password": false,
    "ogTitle": null,
    "ogDescription": null,
    "ogImage": null,
    "targeting": null,
    "cloaking": false,
    "noIndex": false,
    "notes": null,
    "abUrlB": null,
    "abSplit": null,
    "rotation": null,
    "deepLink": false,
    "pixelIds": [],
    "forwardParams": true,
    "clickLimit": null,
    "fallbackUrl": null,
    "conversionTracking": false,
    "conversions": 0,
    "conversionValueCents": 0,
    "conversionCurrency": null
  }
}

The data fields, in the order Flyn sends them:

FieldTypeDescription
eventstringThe event name, the same value as the X-Flyn-Event header.
timestampnumberUnix time in milliseconds when Flyn built the delivery. The same value as t in the X-Flyn-Signature header.
dataobjectThe event data. Its shape depends on the event.
data.idstringThe link id (UUID).
data.slugstringThe short link slug.
data.urlstringThe destination URL.
data.shortUrlstringThe full short URL: https://, the link domain, a slash and the slug.
data.domainstringThe domain the link is on: Flyn's short domain or your custom domain.
data.titlestring | nullThe link title. POST /api/links uses the destination hostname when you send none.
data.clicksnumberHuman clicks. Hits that Flyn filters out as bots or crawlers are not counted here.
data.botClicksnumberHits filtered out as bots or crawlers.
data.qrScansnumberHuman clicks that came from a Flyn QR code. Already included in clicks.
data.totalClicksnumberclicks plus botClicks.
data.statusstring"active", "expired" or "archived".
data.tagsstring[]The tags on the link.
data.createdAtstringWhen the link was created, as an ISO 8601 timestamp.
data.expiresAtstring | nullWhen the link expires, or null.
data.folderIdstring | nullThe folder id, or null.
data.passwordbooleantrue when the link has a password. The password itself is never sent.
data.ogTitlestring | nullCustom link preview title, or null.
data.ogDescriptionstring | nullCustom link preview description, or null.
data.ogImagestring | nullCustom link preview image URL, or null.
data.targetingobject | nullDevice and country rules, or null when the link has none.
data.cloakingbooleanWhether link cloaking is on.
data.noIndexbooleanA stored legacy flag with no effect on how the link is served.
data.notesstring | nullPrivate notes, or null.
data.abUrlBstring | nullThe legacy A/B variant URL, or null.
data.abSplitnumber | nullThe legacy A/B split: the percent of traffic sent to url. The rest goes to abUrlB.
data.rotationobject[] | nullThe weighted rotation destinations (id, url, weight, label), or null.
data.deepLinkbooleanWhether deep linking (open in the native app) is on.
data.pixelIdsstring[]The ids of the retargeting pixels attached to the link.
data.forwardParamsbooleanWhether query parameters a visitor adds to the short link are passed on to the destination.
data.clickLimitnumber | nullThe cap on human clicks, or null.
data.fallbackUrlstring | nullWhere visitors go once the click limit is reached, or null.
data.conversionTrackingbooleanWhether conversion tracking is on.
data.conversionsnumberConversions recorded for the link.
data.conversionValueCentsnumberTotal conversion value, in cents.
data.conversionCurrencystring | nullThe conversion currency, or null.

Payload from the dashboard

For an edit made in the dashboard, data is id plus only the settings changed in that save, under the dashboard's field names: destinationUrl where the API uses url. Values follow the dashboard too: expiresAt is Unix time in milliseconds (a number), not the API's ISO 8601 string, and folderId is an empty string when a link is taken out of its folder. Read-only fields such as shortUrl, clicks and createdAt are never included. A password change appears as password: true (set or replaced) or false (removed). The password itself is never sent.

link.update (dashboard)
{
  "event": "link.update",
  "timestamp": 1790161200000,
  "data": {
    "id": "3f0c2a9e-7b1d-4c55-9a0e-2d8f1b6c4e11",
    "destinationUrl": "https://shop.example.com/sale-v2"
  }
}

Events from the dashboard are limited to 30 a minute per IP address, so editing many links in quick succession there can skip some.

Headers

Every delivery is an HTTP POST with these four headers:

FieldTypeDescription
Content-TypestringAlways "application/json".
X-Flyn-EventstringThe event name. For this event: "link.update".
X-Flyn-Signaturestringt=<Unix time in milliseconds>,v1=<hex HMAC-SHA256>. See Verify the signature.
User-AgentstringAlways "Flyn-Webhook/1.0".

Verify the signature

Flyn signs every delivery. v1 is the HMAC-SHA256, in hex, of the t value, a dot and the raw request body, keyed with your full webhook secret, including its whsec_ prefix. t is Unix time in milliseconds and equals timestamp in the body.

Verify a delivery (Node.js)
import { createHmac, timingSafeEqual } from 'node:crypto';

// rawBody: the request body exactly as it arrived (a Buffer or a string).
// header:  the X-Flyn-Signature value, "t=<milliseconds>,v1=<hex>".
// secret:  your full webhook secret, including the "whsec_" prefix.
export function isFromFlyn(rawBody, header, secret) {
  const parts = Object.fromEntries((header || '').split(',').map((p) => p.trim().split('=')));
  if (!/^\d+$/.test(parts.t || '') || !parts.v1) return false;

  // t is Unix time in MILLISECONDS. Reject a delivery older than 5 minutes.
  if (Math.abs(Date.now() - Number(parts.t)) > 5 * 60 * 1000) return false;

  const expected = createHmac('sha256', secret).update(parts.t + '.').update(rawBody).digest();
  const received = Buffer.from(parts.v1, 'hex');
  return received.length === expected.length && timingSafeEqual(received, expected);
}

Sign the raw body bytes, not a parsed and re-serialized copy. POST /api/webhooks returns the secret once, and the person who created the webhook can copy it in Settings, Webhooks. A complete Express handler is in the webhooks reference.

Delivery rules

  • One attempt. Flyn sends each event once to every webhook that is active and subscribed to it. It does not retry.
  • 10 second timeout for the whole request. Flyn follows up to 5 redirects inside that time.
  • Success is any 2xx response. It resets the failure count to 0.
  • Anything else is a failure and adds 1 to the failure count: a response outside 2xx, a timeout, a connection error, a redirect Flyn refuses to follow, or a URL that no longer resolves to a public address.
  • 10 failures in a row switch the webhook off. Its status becomes inactive, Flyn stops sending to it and emails the person who created it. That email can be skipped when several deliveries fail at the same moment, so check status with GET /api/webhooks as well.
  • Missed events are not sent again, and Flyn keeps no log of single deliveries. Settings, Webhooks shows the failures in a row and the time of the last successful delivery.
  • Switch it back on with PATCH /api/webhooks/:id and {"status": "active"}, or with Activate in Settings, Webhooks. Both reset the failure count.
  • To catch up after an outage, read your links back with GET /api/links, up to 100 a page, and compare them with the copies you hold.

Common questions

Does link.update say which fields changed?

From the API, no: data is the whole link after the change. From the dashboard, data holds the id and only the settings changed in that save.

Is the link password ever sent in a webhook?

No. password is true or false. Flyn replaces the value before any delivery is built.

Does Flyn retry a failed link.update delivery?

No. Flyn sends each link.update once, with a 10 second timeout, and does not send it again. To catch up, read your links back with GET /api/links.

All webhook events

Flyn sends five events. Each has its own page with the payload and the rules for when it fires.

EventSent when
link.clickA person opens one of your short links.
link.createA link is created with POST /api/links or in the dashboard.
link.updateA link is changed with PATCH /api/links/:id or in the dashboard. This page.
link.deleteA link is deleted with DELETE /api/links/:id or in the dashboard.
webhook.testYou send a test ping. You cannot subscribe to it.

Start with the API quick start, or read the webhooks reference for the endpoints that create, list, update, test and delete webhooks.

Was this page helpful? Spotted something wrong?