Skip to content

Docs / All tools / Loop I: Distribution

inbound.link.wrap

Create a short link and track clicks by campaign, channel, or contact without cookies.

0 credits. Free: part of a publish.

Example prompt

Send this to your AI app when Heelo is connected:

Wrap https://example.com/pricing for the email channel in campaign seq_2026q4

Input fields

FieldTypeDescription
target_urlRequiredstringThe destination URL to wrap
campaignstringCampaign id, e.g. 'seq_2026q4'
channelstringChannel, e.g. 'email' | 'bluesky'
contact_idstringContact to attribute the click to
reuse_existingbooleanWhen true, return the first short link already made for the same target_url, campaign, channel and contact_id instead of creating a new one. Default false: every call makes a new code.

Output fields

The fields in data when status is success.

FieldType
short_urlstring
codestring
reusedboolean
answerstring

Code

The call with the input fields that the tool needs. Set HEELO_API_KEY to your API key.

import os
import requests

response = requests.post(
    "https://toolsprimitives.uk/v1/tools/inbound.link.wrap/invoke",
    headers={"Authorization": f"Bearer {os.environ['HEELO_API_KEY']}"},
    json={"input": {
        "target_url": "https://example.com",
    }},
    timeout=120,
)
response.raise_for_status()
print(response.json())