A short link is a short address such as https://sms.example.com/l/7KQ2M9XH4B that sends whoever
opens it to a longer address of your choice. The gateway serves it itself and counts every opening.
What short links are for
- Saving characters. A long web address can double the number of SMS billed per recipient. A short link keeps the message within fewer SMS.
- Measuring. You see how many recipients opened the link, and how many distinct people did. Attached to a campaign, the clicks also appear in the campaign's Clicks counter.
- Keeping your data at home. No third-party shortener is involved: nobody outside your gateway learns who clicked or what you are promoting.
Three ways to get a short link
| Where | What happens | Best for |
|---|---|---|
| Short links screen, New short link | You paste an address, the gateway gives you back the short link to copy wherever you want | A link to reuse, to paste in a template, or to share outside SMS |
| Shorten and track links switch in Quick send | Every web address of the message is replaced by a short link when you click Send | A one-off message with a link |
| Shorten and track links switch in a campaign | Every web address of the campaign text is replaced, when the campaign starts, by a short link attached to that campaign | Measuring the clicks of a campaign |
Your integrations can do the same through the API: see Through the API.
How it works
- A link is created from a destination address, optionally attached to a campaign.
- Its short address is your gateway's public address (
GATEWAY_PUBLIC_URL) followed by/l/and a code of ten characters. Every short link of your gateway has the same length, which lets the dashboard tell you in advance how long your message will be. - The short address goes into your message.
- When a recipient taps it, the gateway records the click and sends them on to the destination.
The code uses capital letters and digits without I, L, O or U, so it cannot be misread when
retyped. It is drawn at random and long enough that nobody can guess your other links by trying
codes.
Your gateway must be reachable from the internet at its public address for recipients' phones to open the link. A gateway only reachable on your local network produces links that work inside your network and nowhere else. The Short links screen reminds you what your links start with.
The Short links screen
Open Short links in the Messages section of the menu. Every account can see it; creating and deleting need an Operator or Superadmin account (a Read only account sees the list and the clicks, without the buttons).
The list
The newest links come first, 50 at a time (Load more shows the next ones).
| Column | What it shows |
|---|---|
| Short link | The full short address, with a copy button. Expired marks a link past its expiry date |
| Destination | The address the link leads to. Hover to read it whole |
| Campaign | The campaign the link is attached to, or None. Deleting a campaign detaches its links, which then show None and keep working |
| Clicks | Every opening, and under it the number of unique visitors |
| Created | Date and time of creation, in the platform time zone (Settings > Sending) |
The counters update by themselves when someone clicks, without reloading the page.
The Campaign filter above the list shows only the links of one campaign. The choice is kept in the page address, so you can bookmark or share the view of a campaign's links.
Row actions
The menu at the end of each row offers:
| Action | Effect |
|---|---|
| Copy the short link | Puts the short address in the clipboard |
| Open the destination | Opens the destination in a new tab. It does not count as a click: the short link is not used |
| See the clicks | Opens the click log of the link in a side panel (see What is recorded about a click) |
| Delete | After confirmation, deletes the link and its click log. The link stops working at once for everyone who received it |
Create a link
Click New short link:
| Field | Required | Default | Allowed values | Effect |
|---|---|---|---|---|
| Destination address | yes | None | An address starting with http:// or https://, with a domain name, 2000 characters at most |
Where the visitor is sent. Anything else (ftp:, javascript:, an address without a domain) is refused under the field |
| Campaign (optional) | no | None | One of your campaigns | Each click also adds to the Clicks counter of that campaign. When the list is filtered on a campaign, it is preselected |
Click Create the link. The window then shows the short link with a copy button; Done closes it and the link appears at the top of the list.
Shorten the links of a message automatically
The Shorten and track links switch appears under the message in Quick send, in step 2 of New campaign, and in the Edit window of a campaign that has not started. It is off by default: a message leaves exactly as typed unless you turn it on.
When it is on:
- every address starting with
http://orhttps://is replaced by a new short link. The rest of the text is not touched, and the punctuation right after an address (a final dot, a comma, a closing parenthesis) stays outside the link; - the same address written twice gets one link;
- all the recipients of the send share the same link, so the clicks are counted per link, not per person;
- an address that is already a short link of your gateway, or that would be refused (longer than 2000 characters), is left as typed.
How the length changes
Under the switch, the screen tells you the effect before you send, for example: "Links to shorten:
- Length: 212 characters before, 118 after, that is 2 SMS before and 1 after, per recipient." The character counter and the cost of the send are computed on the text with its short links, since that is what your carrier bills.
A short link measures the length of your public address plus 13 characters (/l/ and the code).
Most of the time it shortens the message; an address that was already very short can make it
slightly longer. With the switch on, the SMS counter always shows the real figure.
In Quick send
The addresses are replaced when you click Send. The messages in Recent sends, in the queue and in the conversations show the short links, which is what the recipients receive. The new links appear in Short links, attached to no campaign.
In a campaign
The choice is saved with the campaign. The addresses are replaced once, when the campaign starts (at Send now, at Start, or at its scheduled time), by links attached to that campaign:
- until the start, the campaign text keeps the addresses you typed, and you can still turn the switch off in Edit;
- from the start, the campaign text shows the short links, every recipient receives exactly the same text, and each click adds to the campaign's Clicks counter;
- the step 3 summary recalls the choice under Links.
A campaign duplicated from a campaign that already started copies its text with the short links of the original: their clicks still count for the original campaign. To measure the new campaign separately, paste the original addresses back into the text of the copy.
What is recorded about a click
The See the clicks panel lists the openings of a link, newest first, with the total and the number of unique visitors:
| Recorded | Not recorded |
|---|---|
| The date and time | The full IP address: the last part is zeroed before anything is written (203.0.113.0) |
| The browser description (user agent), cut at 200 characters | Any cookie or identifier placed on the visitor |
| A truncated IP address (the Network column) |
Distinct visitors are counted from the truncated address and the browser description, so two people behind the same office connection with the same phone model may count as one. Treat the unique count as a good estimate, not an exact head count.
The event link.clicked can notify your tools at each click: see Webhooks.
Through the API
| Method | Path | What it does |
|---|---|---|
POST |
/api/v1/links |
Creates a link and returns it, with its shortUrl |
GET |
/api/v1/links |
Your links, newest first, with their counters. ?campaignId= filters. The answer also carries shortUrlPrefix and shortUrlLength, what every short link of your gateway starts with and how long it is |
GET |
/api/v1/links/{linkId} |
One link |
GET |
/api/v1/links/{linkId}/clicks |
The click log of a link |
DELETE |
/api/v1/links/{linkId} |
Deletes the link and its click log. The redirect stops at once |
GET |
/l/{code} |
The public address recipients open. No account, no key |
Fields of POST /api/v1/links:
| Field | Required | Default | Allowed values | Effect |
|---|---|---|---|---|
targetUrl |
yes | None | An http or https address, 2000 characters at most |
Where the visitor is sent |
campaignId |
no | None | The identifier of one of your campaigns | Every click also adds to the Clicks counter of that campaign |
expiresAt |
no | Never | A date and time | After that moment, the link answers "not found", exactly like a link that never existed. Only the API sets it |
With an API key, reading needs the read scope and creating or deleting a link needs the admin
scope. See API keys.
Example:
curl -X POST https://sms.example.com/api/v1/links \
-H "X-API-KEY: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"targetUrl": "https://shop.example.com/sales/autumn?utm_source=sms",
"campaignId": "0192f0c4-3b1e-7c55-9a41-2f5d8e6b7a10"}'
The answer contains shortUrl, to paste in your message, and the counters clickCount (every
opening) and uniqueClickCount (distinct visitors).
To shorten the addresses of a message sent through the API, add "shortenLinks": true to
POST /api/v1/messages: it behaves like the Quick send switch, with the scope that sends
messages. Campaigns take the same field, shortenLinks, at creation and in an edit. See
Using the API.
Limits
- A link cannot be edited: to change its destination, create a new one.
- Deleting a link breaks it for everyone who already received it: they get a "not found" page.
- Opening a link is always counted, even by automatic link previews some messaging apps and security filters perform. A few clicks right after sending may come from them.
- A link whose campaign was deleted keeps working and counting its clicks. It is simply no longer attached to a campaign.
- Links made by a send are shared by all its recipients: the gateway does not tell you which recipient clicked.
Troubleshooting
| What you see | Why, and what to do |
|---|---|
The short links start with http://localhost |
GATEWAY_PUBLIC_URL is not set to your public address. See the installation guide |
| Recipients get "not found" | The link was deleted, has expired, or the code was altered when copied |
| Recipients cannot open the link at all | Your gateway is not reachable from the internet at its public address |
| "Enter an address starting with http:// or https://" | The destination has no http:// or https://, or no domain name |
| The switch says "No web address in the message" | The addresses must start with http:// or https://: www.example.com alone is not recognised |
| An address stayed as typed with the switch on | It is already a short link of your gateway, or it is longer than 2000 characters |
| The campaign's Clicks stays at 0 | The link was created without a campaign, or for another campaign. For a campaign with the switch on, check that it has started: the links only exist from then on |
| New short link and Delete are missing | Your account is Read only |