Twilio Link Shortener
Generate branded short links via Linkly's REST API, then drop the result into your Twilio SMS or WhatsApp send. Sub-50ms latency, bulk-create up to 1,000 links per request, OpenAPI 3.0 spec.
1,000 free API calls/mo · OpenAPI 3.0 · 99.9% uptime SLA · Bulk-create up to 1,000 links/req
import twilio from "twilio";
const twilioClient = twilio(
process.env.TWILIO_ACCOUNT_SID,
process.env.TWILIO_AUTH_TOKEN,
);
async function sendBrandedSms({ to, destinationUrl, campaignId }) {
// 1. Shorten the URL via Linkly — branded, on your domain
const link = await fetch(
`https://app.linklyhq.com/api/v1/link?api_key=${process.env.LINKLY_API_KEY}`,
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
workspace_id: process.env.LINKLY_WORKSPACE_ID,
url: destinationUrl,
name: `${campaignId}-${Date.now()}`,
domain: "acme.co",
}),
},
).then(r => r.json());
// 2. Send via Twilio — short branded link in the body
await twilioClient.messages.create({
from: process.env.TWILIO_FROM_NUMBER,
to,
body: `Black Friday is live! 30% off everything for 48hrs only. ${link.full_url}`,
});
}Low-latency API
Sub-50ms link creation. Bulk-create up to 1,000 links per request. Built for high-volume SMS pipelines.
Carrier-trusted domains
Branded short links on your domain pass US carrier filters that flag generic shorteners as spam.
99.9% uptime SLA
Redirect-path SLA backed by status.linklyhq.com. Links don't break if you exceed plan limits.
How Linkly + Twilio works
Three steps. No platform migration, no protocol change.
Generate a Linkly API key
Free signup, no card. Connect your branded domain (one-time DNS step). Grab a bearer token from the dashboard.
Call Linkly before each Twilio send
POST the destination URL, get back a branded short link in ~30ms. Bulk-create up to 1,000 links per request for batch sends.
Pass the short link into Twilio
twilio.messages.create({ body: `Your code: ${link.full_url}` }). Done — branded, trackable, carrier-friendly.
Built for Twilio
Branded, trackable, scriptable — every link you send runs on infrastructure that handles billions of clicks.
Branded short domains
Use your own brand domain (acme.co/promo) on every short link. One-time DNS setup, automatic SSL, unlimited links per domain.
Per-link analytics
Every short link reports geographic, device, and time-of-day click data. Tag links to roll up by segment, variant, or send window.
API for high-volume
Create up to 1,000 short links per API request. Webhook every click into your data warehouse. Build the integration in under a day.
Smart redirects
Route the same link to different destinations by country, device, or time. One link in the message, the right landing page for each recipient.
Code: a Twilio + Linkly send in 25 lines
Drop into your existing Twilio send code. Change the env vars, ship.
import twilio from "twilio";
const twilioClient = twilio(
process.env.TWILIO_ACCOUNT_SID,
process.env.TWILIO_AUTH_TOKEN,
);
async function sendBrandedSms({ to, destinationUrl, campaignId }) {
// 1. Shorten the URL via Linkly — branded, on your domain
const link = await fetch(
`https://app.linklyhq.com/api/v1/link?api_key=${process.env.LINKLY_API_KEY}`,
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
workspace_id: process.env.LINKLY_WORKSPACE_ID,
url: destinationUrl,
name: `${campaignId}-${Date.now()}`,
domain: "acme.co",
}),
},
).then(r => r.json());
// 2. Send via Twilio — short branded link in the body
await twilioClient.messages.create({
from: process.env.TWILIO_FROM_NUMBER,
to,
body: `Black Friday is live! 30% off everything for 48hrs only. ${link.full_url}`,
});
}For multi-language examples (cURL, Python, Ruby, PHP, Go) and the full API reference, see the URL Shortener API.
Why branded links matter on Twilio
Twilio is the most widely-used programmable SMS provider, and US carriers (Verizon, AT&T, T-Mobile) apply spam-filtering rules that are increasingly hostile to generic shorteners on transactional and marketing sends. Branded short links on your own domain pass these filters reliably.
For high-volume senders the character savings matter: a generic shortener is roughly 14 characters, a branded short link is 12 — small per message, large across a million-message send. Combined with multi-byte emoji and Unicode, the difference often decides whether a send fits in one SMS segment or splits into two.
Twilio's own URL shortener service exists but it's a separate add-on with no analytics layer and no support for custom domains across multiple channels. Linkly gives you one short-link inventory and one analytics dashboard across Twilio SMS, email, social, print, and QR.
Pricing that scales with your sends
Linkly's free plan includes 1,000 API calls per month and a real custom domain — enough to ship a Twilio integration end-to-end before paying for anything.
Free
For prototyping and small sends
- 500 clicks / month
- 1 custom domain
- Full analytics + webhook API
- 1,000 API calls / month
- Community support
Growth
For teams shipping production traffic
- 50,000 clicks / month
- Unlimited custom domains
- 100,000 API calls / month
- Priority email support
- 99.9% uptime SLA
Enterprise
For high-volume senders
- Volume click pricing
- Dedicated infrastructure
- SSO + audit log + custom DPA
- Slack-based support
- Contractual SLA + service credits
Twilio link shortener — frequently asked questions
- What is the Twilio link shortener integration?
- Linkly sits between your application and Twilio: call Linkly's REST API to generate a branded short link, then pass the result into Twilio's messages.create() call. No provider migration, no protocol change — Linkly works with any Twilio surface that accepts a URL.
- Does Linkly work with Twilio Programmable Messaging, WhatsApp, Voice, Verify?
- Yes — anywhere Twilio sends a URL. Programmable Messaging (SMS, MMS), WhatsApp Business API, Voice (for SMS-style verification flows), and Verify channels all accept Linkly short links. The Linkly link is just a URL; Twilio doesn't care that it's branded.
- How is this different from Twilio's own URL tracking?
- Twilio offers a Link Shortening & Click Tracking add-on, but it requires a Twilio-owned domain, has no support for branded custom domains across other channels (email, social, print), and the analytics is locked to the Twilio console. Linkly gives you a real branded domain and one analytics layer across every channel.
- What's the latency of the Linkly API?
- Sub-50ms P95 on the link creation endpoint, measured from globally distributed regions. The redirect path itself is sub-millisecond — built to handle traffic bursts (Black Friday, breaking-news comms) without degradation.
- Can I bulk-create short links for a Twilio batch send?
- Yes. Linkly's bulk-create endpoint accepts up to 1,000 URLs per request. For a million-message Twilio batch, that's roughly 1,000 API calls — pipeline-able in seconds. Each link gets its own short URL, its own analytics, and (optionally) its own per-recipient destination.
- Does this work for one-time passwords and verification codes?
- Yes — Linkly is widely used for transactional and verification sends. Links are permanent (no expiry, no breakage on plan downgrades), have a 99.9% uptime SLA, and are HTTPS-only. See the transactional links page for the full pattern.
- What's the cost at 1M+ SMS/month?
- Volume click pricing on the Enterprise plan. Contact sales with your forecast (sends/month, expected click rate, regions, SLA requirements) and we'll quote — most high-volume Twilio integrations close in 2–4 weeks.
- What happens if Linkly is down — does my SMS fail?
- Linkly's 99.9% uptime SLA covers the redirect path — the surface customers tap. If Linkly's link-creation API is briefly degraded, you can fall back to sending the raw destination URL through Twilio while Linkly recovers. Most teams build this fallback into their send pipeline as a defensive measure regardless of provider.
Ship branded Twilio SMS links in an afternoon
Free API key, 1,000 calls per month, no card required. Bulk-create up to 1,000 links per request.