Documentation
Link rules
A link's routes are rules. Each sends the visits that match its conditions to its own url; they are tried in order, the first that matches wins, and every other visit goes to the link's own url. Rules are free on every plan with an account, up to 20 a link. Send them when creating a link or in an update; null or [] removes them.
{
"routes": [
{ "conditions": [{ "kind": "os", "values": ["ios"] }], "url": "https://apps.apple.com/app/id1234567890" },
{ "conditions": [{ "kind": "os", "values": ["android"] }], "url": "https://play.google.com/store/apps/details?id=com.example" },
{
"name": "Lunch menu",
"when": "all",
"conditions": [
{ "kind": "time", "from": "11:00", "to": "15:00", "tz": "America/New_York" },
{ "kind": "weekday", "values": [1, 2, 3, 4, 5], "tz": "America/New_York" }
],
"url": "https://example.com/menus/lunch"
}
]
}whenisall(the default: every condition must hold) orany(one is enough). A rule holds 1 to 10 conditions, and any condition butsplittakes"negate": trueto turn it around.- Who:
device(mobile, tablet, desktop),os(ios, android, windows, macos, linux, chromeos),browser(chrome, safari, firefox, edge, samsung, opera, and the in-app browsers instagram, facebook and tiktok) andlanguage(the browser's first language, such ases), each withvalues. - Where:
country(ISO codes such asUS, from the visitor's network),region(US-CA) andreferrer(sites such asinstagram.com; subdomains match), each withvalues. - When:
time(fromandtoas HH:MM; an end before the start runs past midnight),weekday(values0 for Sunday to 6) anddates(fromand/orto, such as2026-11-01or2026-11-01T09:00, both inclusive). Each takestz:visitor(the visit's own time zone, the default) or an IANA zone such asEurope/London. - How:
via(valueqrfor a scan of the link's QR code,linkfor a click),query(paramand an optionalvalue, read from the short link's own query string) andsplit(percent, 1 to 99). - Shares of visitors come from one draw per visitor, per link, per day, with no cookie: the same person lands in the same place all day. Rules with a share next to each other split one draw, so 50 then 50 is an even A/B test; together they add up to at most 100.
- Fast. Rules read only what the visit already carries (headers, the network's country, region and time zone, the query string), so a link with rules redirects as fast as one without.
- Refusals are 400
validation_failedwith the field indetails, such asroutes.2.conditions.0.values, and the rule's number in the message. The older shape,{ match, countries, url }, is still accepted, and answers mirror it on rules that fit it.
The dashboard lists a link's rules in plain words and has a Test a visit tool: pick a device, place, language, time and how the visitor arrived, and see which rule fires and why. Assistants can set rules through the MCP tools shorten_link and update_link.