ExaLink API
Beta
REST

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.

Base URL

api…

https://api.sendexa.co

Auth

Basic

Dashboard Base64 token

First call

POST

/v1/exalink/links

Setup time

<5 min

token → live link

Prerequisites
  1. A Sendexa business account with API access enabled. Create an account →
  2. An API token from Dashboard → Developers → API Keys. Copy the pre-computed Base64 value.
  3. (Optional) A verified custom domain under Dashboard → ExaLink → Domains if you want branded short URLs.
  4. (Optional) A public HTTPS webhook endpoint for exalink.click and exalink.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.

Bash
# Pattern
Authorization: Basic <YOUR_DASHBOARD_BASE64_TOKEN>
# Example request headers
curl -X GET 'https://api.sendexa.co/v1/exalink/links/link_01HZX…' \
-H 'Authorization: Basic YOUR_DASHBOARD_BASE64_TOKEN' \
-H 'Accept: application/json'

Step 2 — Create a smart link

POST
/v1/exalink/links

The only required field is destination. Omitting slug generates a random short path. UTM fields are appended to the final redirect URL automatically.

Bash
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)

JSON
{
"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.

SMS

Transactional alert

“Your invoice is ready: https://sndx.in/pay-88421”

WhatsApp

Template button URL

Pass the short URL as a dynamic button parameter in your template send.

QR / Print

Offline campaigns

Encode shortUrl in a QR code; analytics still apply.

Step 4 — Read analytics

GET
/v1/exalink/links/:id/analytics

After a few clicks, fetch breakdowns by country, device, referrer, and timeseries. Full field reference is on the Analytics page.

Bash
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'
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 redirect
  • exalink.converted — when you report or detect a conversion for that link

See the Webhooks guide for payload shapes, signature verification, and retries.

Launch checklist
  • 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