Getting Started
Go from zero to a live, trackable smart link in minutes. This guide covers authentication, your first create call, sharing the short URL, and verifying analytics.
Basic Auth
Use the Base64 token from your dashboard — no OAuth dance required for server-side apps.
One Create Call
A single POST returns a short URL ready for SMS, WhatsApp, email, or print.
Built-in Analytics
Clicks, geo, device, and referrer data are available immediately after the first visit.
Optional Webhooks
Stream click and conversion events to your backend without polling.
api…
https://api.sendexa.co
Basic
Dashboard Base64 token
POST
/v1/exalink/links
<5 min
token → live link
Authentication
Authorization: Basic <token>. Auth guide →- A Sendexa business account with API access enabled. Create an account →
- An API token from Dashboard → Developers → API Keys. Copy the pre-computed Base64 value.
- (Optional) A verified custom domain under Dashboard → ExaLink → Domains if you want branded short URLs.
- (Optional) A public HTTPS webhook endpoint for
exalink.clickandexalink.converted.
Step 1 — Authenticate
Every request must include an Authorization header. Use the token exactly as shown in the dashboard (already Base64-encoded). Do not re-encode it.
# PatternAuthorization: Basic <YOUR_DASHBOARD_BASE64_TOKEN># Example request headerscurl -X GET 'https://api.sendexa.co/v1/exalink/links/link_01HZX…' \-H 'Authorization: Basic YOUR_DASHBOARD_BASE64_TOKEN' \-H 'Accept: application/json'
Keep tokens server-side
shortUrl to clients.Step 2 — Create a smart link
The only required field is destination. Omitting slug generates a random short path. UTM fields are appended to the final redirect URL automatically.
curl -X POST 'https://api.sendexa.co/v1/exalink/links' \-H 'Content-Type: application/json' \-H 'Authorization: Basic YOUR_DASHBOARD_BASE64_TOKEN' \-d '{"destination": "https://pay.example.com/invoice/inv_88421","slug": "pay-88421","title": "Invoice #88421","utm": {"source": "whatsapp","medium": "transactional","campaign": "invoice_pay"},"expiresAt": "2026-08-01T00:00:00.000Z"}'
Success response (201)
{"success": true,"code": "LINK_CREATED","message": "Smart link created successfully.","requestId": "REQ-1782200888123","timestamp": "2026-07-12T10:28:08.123Z","data": {"id": "link_01HZXK9P2M7QVR8N4W3T6Y5B0A","shortUrl": "https://sndx.in/pay-88421","slug": "pay-88421","domain": "sndx.in","destination": "https://pay.example.com/invoice/inv_88421?utm_source=whatsapp&utm_medium=transactional&utm_campaign=invoice_pay","title": "Invoice #88421","status": "active","utm": {"source": "whatsapp","medium": "transactional","campaign": "invoice_pay","term": null,"content": null},"passwordProtected": false,"maxClicks": null,"expiresAt": "2026-08-01T00:00:00.000Z","clicks": 0,"uniqueClicks": 0,"createdAt": "2026-07-12T10:28:08.123Z","updatedAt": "2026-07-12T10:28:08.123Z"}}
Step 3 — Share the short URL
Use data.shortUrl in any channel. When a user opens the link, ExaLink records the click (geo, device, referrer) and redirects them to the destination with UTM query parameters applied.
Transactional alert
“Your invoice is ready: https://sndx.in/pay-88421”
Template button URL
Pass the short URL as a dynamic button parameter in your template send.
Offline campaigns
Encode shortUrl in a QR code; analytics still apply.
Step 4 — Read analytics
After a few clicks, fetch breakdowns by country, device, referrer, and timeseries. Full field reference is on the Analytics page.
curl -X GET 'https://api.sendexa.co/v1/exalink/links/link_01HZXK9P2M7QVR8N4W3T6Y5B0A/analytics?from=2026-07-01&to=2026-07-12' \-H 'Authorization: Basic YOUR_DASHBOARD_BASE64_TOKEN' \-H 'Accept: application/json'
{"success": true,"code": "ANALYTICS_OK","data": {"linkId": "link_01HZXK9P2M7QVR8N4W3T6Y5B0A","summary": {"clicks": 142,"uniqueClicks": 98,"conversions": 12,"conversionRate": 0.0845},"countries": [{ "country": "GH", "name": "Ghana", "clicks": 110 },{ "country": "NG", "name": "Nigeria", "clicks": 22 }],"devices": [{ "device": "mobile", "clicks": 128 },{ "device": "desktop", "clicks": 14 }],"referrers": [{ "referrer": "direct", "clicks": 90 },{ "referrer": "whatsapp", "clicks": 40 }],"timeseries": [{ "date": "2026-07-11", "clicks": 61, "uniqueClicks": 44 },{ "date": "2026-07-12", "clicks": 81, "uniqueClicks": 54 }]}}
Step 5 — (Optional) Enable webhooks
In Dashboard → Developers → Webhooks, add your HTTPS endpoint and subscribe to:
exalink.click— every successful redirectexalink.converted— when you report or detect a conversion for that link
See the Webhooks guide for payload shapes, signature verification, and retries.
- API token stored in a secrets manager / env var
- Create link returns 201 with shortUrl
- Manual click redirects to destination with UTM params
- Analytics summary increments after the click
- Webhook secret verified on a sample exalink.click
- Error handling for SLUG_TAKEN and DOMAIN_NOT_VERIFIED
Next steps
Related docs
- Authentication — Basic Auth token format
- Rate limits — 100 req/s default
- Platform webhooks — shared retry & signature model