Skip to main content
POST
Create a trackable short link that routes through your click tracker to an offer destination URL. The short link uses your list’s configured link shortener domain, and the click tracker uses your list’s click tracking domain (or the platform fallback).
Requires Offer Management. This endpoint is only available to accounts with the Offer Management product enabled. Returns 403 product_not_enabled otherwise.

How It Works

When a recipient clicks the short link, the redirect chain is:
  1. The short link (shortUrl) goes in your SMS message body
  2. On click, it redirects through the click tracker (clickTrackerUrl) which records the click
  3. The click tracker redirects to the offer’s destination URL

Body Parameters

string
Trackly partnership offer ID. Required if externalOfferId is not provided.
string
External platform offer ID (e.g. TUNE/HasOffers ID). Required if offerId is not provided. If both are provided, offerId takes priority.
integer
Sending list ID. Required if phoneNumber is not provided. The list determines which link shortener and click tracking domains are used.
string
Sending list phone number in E.164 format (e.g. +18005551234). Required if listId is not provided. Alternative way to identify the sending list.

Response Fields

string
Full short URL to include in your SMS message body. Uses the list’s configured link shortener domain.
Unique short link ID. Appended to the domain to form the shortUrl.
string
The click tracker URL that the short link redirects through. Records the click before forwarding to the offer destination.
string
The offer’s final destination URL that the recipient lands on after click tracking.
string
The link shortener domain used for this short link.
string
The Trackly partnership offer ID the link is associated with.

Examples

Using External Offer ID and Phone Number

Error Codes

Macros & URL Parameters

The click tracker supports macros — placeholder tokens in your offer’s Destination URL Template that get replaced with real values at click time. You can configure the Destination URL Template on your offer in the UI (under Offer Management > Offers).

Supported Macros

Use these in your Destination URL Template with curly brace syntax (e.g. {click_id}):

Example Destination URL Template

If no macros are present in the template, click_id and any sub-tracking parameters are automatically appended as query parameters. Any query parameters appended to the short link URL at click time are forwarded through the click tracker and used to populate macros. This lets you pass dynamic per-recipient values without creating separate links. For example, if your short link is https://yourdomain.com/Ab3kX9, you can append parameters in the SMS body:
The click tracker picks up sub1, sub2, and source from the query string, substitutes them into the Destination URL Template macros, and redirects the visitor to the final URL with all values filled in. This means you can create one link per offer/list combination and personalize it per message by appending query parameters in your message body.

Notes

  • The offer must be active (status: 'active') to create links.
  • The sending list must be active and have a link shortener domain configured in its settings.
  • If the list has a custom click tracking domain configured, it will be used. Otherwise, the platform’s default click tracker is used.
  • Each call creates a new unique short link. There is no deduplication — calling this endpoint twice with the same parameters produces two different links.

Next Steps

Link Tracking

Track clicks and attribute conversions

Create Offer

Set up an offer before creating links