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/:idchanges a link: its destination, slug, title, status or any other field. The flyn-sdk package and the MCP server'supdate_linktool 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, notlink.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.
{
"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:
| Field | Type | Description |
|---|---|---|
| event | string | The event name, the same value as the X-Flyn-Event header. |
| timestamp | number | Unix time in milliseconds when Flyn built the delivery. The same value as t in the X-Flyn-Signature header. |
| data | object | The event data. Its shape depends on the event. |
| data.id | string | The link id (UUID). |
| data.slug | string | The short link slug. |
| data.url | string | The destination URL. |
| data.shortUrl | string | The full short URL: https://, the link domain, a slash and the slug. |
| data.domain | string | The domain the link is on: Flyn's short domain or your custom domain. |
| data.title | string | null | The link title. POST /api/links uses the destination hostname when you send none. |
| data.clicks | number | Human clicks. Hits that Flyn filters out as bots or crawlers are not counted here. |
| data.botClicks | number | Hits filtered out as bots or crawlers. |
| data.qrScans | number | Human clicks that came from a Flyn QR code. Already included in clicks. |
| data.totalClicks | number | clicks plus botClicks. |
| data.status | string | "active", "expired" or "archived". |
| data.tags | string[] | The tags on the link. |
| data.createdAt | string | When the link was created, as an ISO 8601 timestamp. |
| data.expiresAt | string | null | When the link expires, or null. |
| data.folderId | string | null | The folder id, or null. |
| data.password | boolean | true when the link has a password. The password itself is never sent. |
| data.ogTitle | string | null | Custom link preview title, or null. |
| data.ogDescription | string | null | Custom link preview description, or null. |
| data.ogImage | string | null | Custom link preview image URL, or null. |
| data.targeting | object | null | Device and country rules, or null when the link has none. |
| data.cloaking | boolean | Whether link cloaking is on. |
| data.noIndex | boolean | A stored legacy flag with no effect on how the link is served. |
| data.notes | string | null | Private notes, or null. |
| data.abUrlB | string | null | The legacy A/B variant URL, or null. |
| data.abSplit | number | null | The legacy A/B split: the percent of traffic sent to url. The rest goes to abUrlB. |
| data.rotation | object[] | null | The weighted rotation destinations (id, url, weight, label), or null. |
| data.deepLink | boolean | Whether deep linking (open in the native app) is on. |
| data.pixelIds | string[] | The ids of the retargeting pixels attached to the link. |
| data.forwardParams | boolean | Whether query parameters a visitor adds to the short link are passed on to the destination. |
| data.clickLimit | number | null | The cap on human clicks, or null. |
| data.fallbackUrl | string | null | Where visitors go once the click limit is reached, or null. |
| data.conversionTracking | boolean | Whether conversion tracking is on. |
| data.conversions | number | Conversions recorded for the link. |
| data.conversionValueCents | number | Total conversion value, in cents. |
| data.conversionCurrency | string | null | The 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.
{
"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:
| Field | Type | Description |
|---|---|---|
| Content-Type | string | Always "application/json". |
| X-Flyn-Event | string | The event name. For this event: "link.update". |
| X-Flyn-Signature | string | t=<Unix time in milliseconds>,v1=<hex HMAC-SHA256>. See Verify the signature. |
| User-Agent | string | Always "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.
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 checkstatuswithGET /api/webhooksas 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/:idand{"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.
| Event | Sent when |
|---|---|
| link.click | A person opens one of your short links. |
| link.create | A link is created with POST /api/links or in the dashboard. |
| link.update | A link is changed with PATCH /api/links/:id or in the dashboard. This page. |
| link.delete | A link is deleted with DELETE /api/links/:id or in the dashboard. |
| webhook.test | You 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?