Create Shortlink
create_shortlinkCreates an active standalone redirect shortlink at https://linq.es/s/:code with an optional custom vanity slug, smart iOS/Android device redirects, optional profile attribution, and automatic UTM query parameter injection. When to use: choose create_shortlink for standalone shareable redirect URLs used in social posts, newsletters, QR codes, or ad campaigns; use add_profile_link instead to add a visible button to a Link-in-Bio profile page. Prerequisites: requires Bearer lnq_live_ Pro authentication; optionally call list_shortlinks first to check existing slugs or list_profiles to confirm a 'profile' handle. Validation and limits: 'targetUrl' (and optional 'iosUrl', 'androidUrl' when provided) must start with http:// or https://; optional 'code' must be 3-50 characters matching ^[a-zA-Z0-9_-]{3,50}$, must not use reserved system routes (such as admin, api, login, mcp, pricing, explore, tools), and must be globally unique across Linq.es (if 'code' is omitted, a random 6-character alphanumeric slug is generated); enforces the Pro cap of 500 shortlinks per account, returning isError: true on invalid URLs, slug collision, or quota exhaustion. Side effects: non-idempotent (creates a new shortlink when 'code' is omitted, or fails on duplicate 'code') and immediately activates https://linq.es/s/ in Firestore. Returns: JSON text with {status, code, shortUrl, targetUrl, shortlink: {code, targetUrl, iosUrl, androidUrl, title, owner, profile, active, createdAt, updatedAt, clickCount, utmSource, utmMedium, utmCampaign, utmTerm, utmContent}}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"targetUrl": "<targetUrl>"
},
"name": "create_shortlink"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Optional custom vanity slug for https://linq.es/s/<code> (3-50 letters, digits, hyphens, or underscores; omit to auto-generate a unique 6-char code). | |
| title | No | Optional internal label to identify the shortlink in dashboard listings and analytics. | |
| iosUrl | No | Optional http:// or https:// destination override redirected to when opened on iOS/iPadOS devices. | |
| profile | No | Optional owned Linq.es profile handle to associate this shortlink with for filtering in list_shortlinks. | |
| utmTerm | No | Optional utm_term paid keyword parameter appended to the destination URL on redirect. | |
| targetUrl | Yes | Default destination URL starting with http:// or https:// where visitors are redirected. | |
| utmMedium | No | Optional utm_medium query parameter appended to the destination URL on redirect (e.g. 'social', 'cpc', 'qr'). | |
| utmSource | No | Optional utm_source query parameter appended to the destination URL on redirect (e.g. 'newsletter', 'instagram'). | |
| androidUrl | No | Optional http:// or https:// destination override redirected to when opened on Android devices. | |
| utmContent | No | Optional utm_content variant parameter appended to the destination URL on redirect (e.g. 'header_cta'). | |
| utmCampaign | No | Optional utm_campaign query parameter appended to the destination URL on redirect (e.g. 'spring_launch'). |