A dynamic link is a standardDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/org-quicko/linq/llms.txt
Use this file to discover all available pages before exploring further.
redirect link with one or more conditional Rules attached. When a visitor hits the short URL, linq evaluates the rules in order and redirects to the first destination whose conditions all hold. If no rule matches, the link’s own default destination is used as a fallback. This lets a single short URL serve different destinations to different audiences — all without any server-side logic on your end.
How Rules Work
Rules are evaluated synchronously inside the redirect handler, before the 302 is issued. No external calls are made during rule matching.Rules are ordered by position
Each rule has a
position field assigned by the server (derived from the array index in the request body). Lower positions are checked first.All conditions in a rule must hold (AND)
A rule can carry up to 10 conditions. Every condition in the rule must evaluate to
true for that rule to win. There is no OR logic within a single rule — use separate rules for that.First matching rule wins
The moment a rule’s conditions all hold, its
destination is used and evaluation stops. Subsequent rules are not checked.Rule matching is synchronous and in-process — it happens entirely inside the redirect hot path with no external calls, no database reads beyond what was already fetched for the link, and no added latency beyond a few microseconds of CPU.
Condition Types
Every condition is one of two discriminated types, defined by atype field.
platform
Matches the visitor’s platform as detected from the User-Agent header.
Discriminator value.
The platform to match against.
android and ios are detected from mobile User-Agents; everything else resolves to desktop.query_param
Matches a key (and optionally a specific value) in the visitor’s incoming query string.
Discriminator value.
The query parameter key to look for. Case-sensitive. Up to 64 characters.
Optional. When omitted, the condition is satisfied if the key is present with any value (including an empty string). When provided, the condition is satisfied only if the key is present with exactly this value. Up to 512 characters.
Rule Fields
A rule as returned by the API:Unique identifier for this rule row.
The link this rule belongs to.
Server-assigned evaluation order. Zero-indexed. The lowest matching position wins. Controlled entirely by the array order you send to
PUT /api/v1/links/{id}/rules.The URL visitors are sent to when this rule matches.
Array of 1–10 conditions. All must hold for the rule to match (AND logic). A rule with zero conditions is rejected at write time.
Managing Rules via the API
Rules are a sub-resource of a link. The full set is replaced atomically in one request — there is no partial update.| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/links/{id}/rules | Read the current rules in position order. |
PUT | /api/v1/links/{id}/rules | Replace the entire set. Send [] to remove all rules. Requires editor role or above. |
PUT body is an ordered array of rule inputs. The server assigns position from the array index, so the order you send is the order they are evaluated.
You can also set rules at link creation time by including a
rules array in POST /api/v1/links. This is equivalent to creating the link and then calling PUT /api/v1/links/{id}/rules in one transaction.Example: Mobile Deep-Linking
A common use case is sending mobile users to the relevant app store while desktop users land on the web product page.- On iOS → redirects to the App Store listing
- On Android → redirects to the Google Play listing
- On desktop (or any undetected platform) → redirects to the link’s own
destination(https://example.com)
Example: Query Parameter Routing
Route visitors based on UTM parameters or feature flags already present in their session.preview key in their query string, regardless of its value.
Example: Combining Conditions
Multiple conditions in a single rule are ANDed together:utm_medium=email in their query string. An iOS visitor without that parameter falls through to the next rule or the default destination.
Use Cases
App store deep-linking
One short URL in your bio or print ad automatically routes iOS users to the App Store, Android users to Play Store, and desktop visitors to your web app.
UTM-based personalization
Route visitors from different campaigns to different landing pages based on UTM parameters, without maintaining separate short URLs per campaign.
A/B testing
Use a query parameter flag to split traffic between two destinations. Combine with
forward_query: true so downstream analytics tools see the full query string.Gated content
Gate a destination behind a query parameter check — for example, a token set by your email platform — without adding server-side redirect logic.