Blog
May 13, 2026

The programmatic link API your SMS programme is missing

SMS is the hardest test case for any link tool, which makes it the most useful one.

A typical SMS campaign has three constraints that compound: a 160-character limit, US carriers that filter generic shorteners, and the need to attribute every click back to a specific recipient or segment. Get those three right and the same architecture handles transactional email, push notifications, in-app sharing, partner programs, and anything else you send programmatically.

This is a practical look at how teams build on Linkly's API — starting with SMS, because the constraints are sharpest there, then extending to the rest of the programmatic surface.

Why generic shorteners stop working past a certain volume

Most marketing teams start with whatever shortener is built into their sending platform. It works fine — until one of three things happens.

Deliverability degrades. US carriers (Verizon, AT&T, T-Mobile) and the SMS aggregators feeding them have grown increasingly aggressive about filtering generic shortener domains, particularly on promotional sends. Links on real brand domains pass through cleanly; links on shared generic domains get rate-limited, deprioritised, or dropped.

Click-through rate underperforms. Industry research consistently puts branded short links 25–39% ahead of generic shorteners on CTR. The mechanism is recognition: recipients click links they trust, and a recognisable domain converts trust into clicks. Generic shorteners read as "I have no idea who sent this."

Attribution stays shallow. Built-in shorteners give you campaign-level data. They rarely give you per-recipient identity at the link level — which is exactly what you need for retargeting, lifecycle triggers, or proper revenue attribution.

These are not "nice to fix later" problems. They are the difference between an SMS programme that compounds and one that flatlines.

The minimum viable API integration

The integration most teams settle on is two lines of code in their sending pipeline. Before handing a message to the SMS provider, shorten the destination URL through Linkly:

curl -X POST https://app.linklyhq.com/api/v1/link \

  -H "Authorization: Bearer YOUR_API_KEY" \

  -H "Content-Type: application/json" \

  -d '{

    "url": "https://acme.com/bf/promo?recipient=48201",

    "name": "bf-48201",

    "domain_id": 123

  }'

The response gives you a branded short URL (acme.co/bf30-style, on your own domain) which goes straight into the SMS body. Single-request creation is fine up to a few hundred messages per minute. For bulk sends, the bulk-create endpoint accepts up to 1,000 URLs in one request — enough that even a several-million-message campaign rounds down to a few thousand API calls.

The full reference is at the URL Shortener API page, and the OpenAPI 3.0 spec drops into Postman, Insomnia, or whatever client you already use.

What you actually get back

Three things matter operationally, and they're all in the API contract:

A branded short link, automatic SSL included. Average length around 18 characters — short enough to keep a typical SMS in one segment instead of splitting into two (which roughly doubles the send cost).

Real-time click webhooks. Subscribe an endpoint and Linkly POSTs every click within seconds, with link ID, tags, timestamp, geo, device, browser, and referrer. That webhook is enough to drive retargeting audiences, kick off follow-up flows, advance CRM stages, or fire fraud-detection rules.

Permanent links, 99.9% uptime SLA. Sub-millisecond redirect latency on a path that's served over a billion clicks. Links don't break if you exceed plan limits — which matters most for transactional sends where a dead link is a support ticket.

Three patterns we see in production

The integration shape depends on where you're sending from.

Teams on Klaviyo, Attentive, or Postscript typically use Linkly for the link layer underneath their existing platform. The sending platform handles list, segmentation, and authoring; Linkly handles every URL inside the message. The win is a CTR lift over the platform's built-in shortener plus an analytics layer that survives if you ever change SMS vendors.

Teams building on Twilio, Bandwidth, or Sinch directly integrate via the REST API at send time. URLs are shortened just-in-time, often with the recipient ID baked into the link name or tags so the click webhook arrives pre-attributed. This is the pattern for transactional sends, alerts, and multi-step authentication flows where the link is generated dynamically per message.

Agencies and multi-brand operations use workspaces to keep brands isolated. Each client gets its own short domain, its own users, its own analytics, its own billing. Shareable read-only analytics URLs mean clients can see their own performance without a Linkly account or another seat to license.

The same pattern works beyond SMS

Once the API integration exists, it tends to spread across the rest of the messaging stack. The constraints that make it work for SMS — branded domains, programmatic generation, real-time webhooks, per-message attribution — apply almost anywhere links go out at volume.

Transactional email. Order confirmations, magic links, password resets, shipping notifications. Every embedded link gets shortened and tracked per recipient. The 99.9% uptime SLA matters more here than anywhere else: a dead link in a password reset is a P1.

Push notifications. Payloads are tiny, so a short branded link is the only kind that fits cleanly. Per-notification attribution lets you measure which campaigns actually drive returns to the app instead of guessing from in-app session timing.

In-app share flows. Generate a branded short link when a user hits "Share". Webhook every click back into your analytics. You see which channels drive viral loops and which posts convert, without trusting whatever referrer the receiving platform happens to forward.

Affiliate and partner programmes. Mint branded, attributable links per partner programmatically, with their identifier in the tag schema. No spreadsheet of partner codes; the segmentation is in the data from day one.

Per-piece QR codes. The same API generates trackable QR codes — useful for retail packaging, OOH, events, and any printed surface where you want to attribute each physical placement separately.

AI assistants and agents. Linkly publishes an official MCP server, so agents that send messages on behalf of users can mint and track branded links natively — same auth, same domains, same analytics.

A reasonable place to start

The free tier includes 1,000 API calls per month, one custom domain, and the full analytics and webhook APIs. That's enough to wire up a working integration, ship a test campaign on a real brand domain, and validate the CTR lift before paying for anything.

The faster path:

For high-volume sends — 1M+ SMS messages a month, transactional infrastructure where the redirect path is critical, or multi-brand setups that need workspace separation — book a 20-minute walkthrough and we'll size the integration with you.

Rastrea 500 clics mensuales con todas las funciones incluidas.