Create a tracked link
create_linkCreate a tracked link: an address on the business's own domain (path, e.g. "/instagram" → plumbingsite.com/instagram; optional) plus a short address that works at once, sending visitors to destination and counting every click. destination.kind: whatsapp | call | sms (phone defaults to the site's business number — never invent one), email (email required), page (a path on this site), web (a full https address). tracking { source, medium, campaign, content?, term? } is added as campaign tags to page/web destinations so the site's analytics and lead forms record where people came from; WhatsApp ignores URL tags, so a short "(ref …)" is added to the prefilled message (prefill_text) to match the first message back to the link. status is 301 (permanent, the default; it is served uncached, so every click is still counted and later edits take effect) unless the user asks for a temporary 302 (or 307/308). Optional expires_at with fallback_url for campaign links. The path must not be a page, a redirect or another link. The on-domain address goes live within a minute or two on a published site, otherwise at publish. This is a marketing link (a bio link, a QR code, a campaign), made only when the owner asks to track or brand one. When they ask for "the link" to their site or design to open or send it, in any language ("Restar ka link bnao", "send my website link"), that is the preview link from share_site_link, not this.
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": {
"site_id": "<site_id>",
"label": "<label>",
"destination": "<destination>"
},
"name": "create_link"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Address on the site, e.g. /instagram. Omit for a short link only. | |
| label | Yes | Name the owner will recognise, e.g. "Instagram bio" | |
| status | No | 301 permanent (default) unless the user asks for temporary (302) | |
| site_id | Yes | The site, from list_sites | |
| tracking | No | Campaign tags (added to page / web destinations as utm_*) | |
| user_goal | No | Optional: the user's goal behind this call, in one short sentence of plain words (e.g. "add a page so customers can book tables"). No names, emails or other personal details. | |
| expires_at | No | ISO date the link stops; visitors then go to fallback_url (default the homepage) | |
| description | No | ||
| destination | Yes | Where the link sends people | |
| fallback_url | No | ||
| prefill_text | No | First message for WhatsApp / text / email | |
| forward_query | No | Pass on the visitor's own ad tags (utm_*, gclid…) to web destinations (default true) | |
| tag_destination | No | Add the campaign tags to the destination (default true) |