Documentation Index
Fetch the complete documentation index at: https://docs.linkutm.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Short links resolve at the root of the linkutm host, not under/api/v1. A short link looks like:
Authorization header, no x-workspace-id header, no API key. They are the visitor-facing side of the product, separate from the authenticated API.
| Path | Method | Purpose |
|---|---|---|
/:shortCode | GET | Resolve a short link and redirect the visitor |
/qr/:shortCode | GET | Resolve a short link opened from its QR code |
/:shortCode | POST | Submit a password for a password-protected link |
/ | GET | Bare-domain redirect to a domain’s configured default |
Resolve a short link
302 redirect to the destination.
Example
Resolution order
Check expiry
If
expiresAt is set and is in the past, the response is 410 Gone with the message Link has expired. See the expiry note below.Check password protection
If the link has a password and the visitor has not already verified it, an HTML password page is returned with status
200. See Password protection.Count the click
If the visitor’s user agent looks like a real browser, the click is recorded and the link’s click counter is incremented. Bot and preview-crawler traffic is excluded - see Click counting.
Route by device
If the OS is detected as iOS and
iosUrl is set, the visitor is redirected there. If the OS is Android and androidUrl is set, the visitor is redirected there. See Device deep linking.Build the destination and redirect
The destination URL is built from the link’s
url plus its UTM parameters. If the link has tracking pixels, a pixel-firing HTML page is returned instead of a bare redirect. See Pixel firing page. Otherwise a 302 to the destination is sent.Destination URL
The redirect target is the link’surl with UTM query parameters appended:
utm_source,utm_medium,utm_campaign,utm_term,utm_contentare added for whichever of those fields are set on the link.- Each key of
customUtmParamsis added with autm_prefix.{"audience": "lookalike_3"}becomesutm_audience=lookalike_3.
QR redirect
GET /:shortCode, but the recorded click is flagged as a QR-code scan so it shows separately in analytics.
The same flagging happens on GET /:shortCode when the request carries ?via=qr:
QR codes generated by linkutm point at
/qr/:shortCode. The ?via=qr query parameter is an equivalent way to mark a scan when you cannot use the /qr/ path.Password protection
When a link has apassword set, the redirect does not happen until the visitor proves the password.
Visiting a protected link
GET /:shortCode on a protected link returns an HTML password page with status 200 (not a redirect, not an error) whenever the visitor lacks a valid verification cookie.
Submitting the password
The password to check against the link.
- If the link has no password, this endpoint redirects straight to the destination with
302. - If the submitted password is wrong, the password page is re-rendered with status
200and anIncorrect password. Please try again.message. - If the password is correct, a verification cookie named
lnk_pw_<linkId>is set (httpOnly,sameSite=strict, scoped to/<shortCode>, one-hour lifetime), the click is counted, device routing is applied, and the visitor is redirected with302to the destination.
Verification cookie
After a successfulPOST, subsequent GET /:shortCode requests that present the matching lnk_pw_<linkId> cookie skip the password page and redirect immediately. The cookie expires after one hour, after which the password is requested again.
Device deep linking
The redirect parses the visitor’s user agent to detect the operating system:- OS detected as iOS and the link has
iosUrlset: the visitor is302-redirected toiosUrl. - OS detected as Android and the link has
androidUrlset: the visitor is302-redirected toandroidUrl. - Otherwise: the visitor goes to the standard UTM-built destination.
GET /:shortCode, GET /qr/:shortCode, and after a successful password POST. If the matching device URL is empty, the standard destination is used.
Device URLs are used verbatim. UTM parameters are not appended to
iosUrl or androidUrl - only the standard url destination gets UTM query parameters.Pixel firing page
If a link has one or more enabled tracking pixels, the redirect does not send a bare302. Instead it returns a small HTML page that:
- Loads the pixel scripts for each attached pixel (Facebook, GA4, GTM, Twitter, LinkedIn, TikTok, Pinterest, Snapchat).
- Fires a page-view event on each.
- Redirects to the real destination after roughly 300 ms via
setTimeout, with a 1 secondmeta refreshas a fallback.
200 and Cache-Control: no-store. Visitors see a brief “Redirecting…” screen. Links with no pixels skip this page and get a direct 302.
Click counting
A click is recorded and the link counter incremented only when the visitor’s user agent looks like a genuine browser. The following traffic is excluded from counts:- Link-preview crawlers - Slack, Facebook, Twitter, LinkedIn, Discord, Telegram, Pinterest, WhatsApp, Embedly, iframely, Microsoft Teams, and similar.
- HTTP client libraries and tools -
curl,wget,python-requests,axios,node-fetch,okhttp, Postman, Insomnia, HTTPie, and similar. - Uptime and monitoring services - Pingdom, StatusCake, UptimeRobot, Site24x7, Better Stack.
- Common SEO and scanning bots - AhrefsBot, SemrushBot, DotBot, MJ12bot, PetalBot, Applebot.
- Headless browsers - HeadlessChrome, headless Edge, headless Firefox.
Because
curl is filtered out, the curl examples on this page redirect correctly but do not register as clicks. Use a real browser to see a click recorded.Bare-domain redirect
- If the domain has a
defaultRedirectset and its status isactive, the visitor is302-redirected there. - Otherwise the response is
404 Page not found.
go.acme.com with no path) to a marketing site, while still serving short links on every other path.
Expiry and archived
| State | Response | Notes |
|---|---|---|
expiresAt in the past | 410 Link has expired | Expired links stop resolving. |
archived: true | 404 Link not found | Archived links do not resolve. |
| Short code unknown | 404 Link not found |
Errors
| Code | When |
|---|---|
200 | Password page shown, or pixel-firing page served - this is not an error, the body is HTML |
302 | Normal redirect to the destination, device URL, or bare-domain default |
404 | Short code not found, link archived, or bare domain with no configured default |
410 | Link is past its expiresAt and no longer resolves |