Blog/Developer Guide

Link Tracking API Guide

Integrate link tracking into your applications with Track Link's REST API. Create tracked links, fetch click analytics, and build custom dashboards — all programmatically.

Published March 18, 2026 — Updated March 21, 2026

Why use the link tracking API?

While Track Link's dashboard is great for manual link management, the API unlocks automation. Use it to:

  • - Create tracked links programmatically from your CRM, CMS, or email platform
  • - Fetch click analytics and build custom reports or dashboards
  • - Automate link creation for marketing campaigns at scale
  • - Integrate click data into your existing analytics pipeline
  • - Build internal tools that leverage link tracking

Authentication

All API requests require a Bearer token. Get your token by logging in via the auth endpoint:

POST /api/auth/login

{

"username": "your-username",

"password": "your-password"

}

// Response: { "access_token": "eyJhbG..." }

Create a tracked link

Create a new tracked link by sending a POST request:

POST /api/links

Authorization: Bearer your-token

{

"name": "Product Launch Campaign",

"destination": "https://example.com/landing",

"slug": "launch-2026"

}

The response includes the full link object with its tracked URL, ID, and creation timestamp.

Fetch click analytics

Retrieve click statistics for your links:

GET /api/clicks/stats?linkId=link-id

Authorization: Bearer your-token

// Returns: total clicks, unique clicks,

// geographic breakdown, device stats,

// browser data, and UTM analytics

Filter by date range, link ID, or other parameters. See the full API documentation for all available endpoints and parameters.

List all links

GET /api/links

Authorization: Bearer your-token

// Returns: array of all your tracked links

// with name, slug, destination, click count, status

Update a link

PATCH /api/links/:id

Authorization: Bearer your-token

{

"name": "Updated Name",

"destination": "https://example.com/new-page",

"isActive": true

}

Common integration patterns

Email platform integration

Before sending a campaign, use the API to create a tracked link for each URL in your email. Replace the original URLs with tracked versions to see click analytics per email.

CMS auto-linking

When publishing blog posts or pages, automatically create tracked links for external URLs. Track which content drives the most outbound clicks.

Custom analytics dashboard

Fetch click data via the API and display it in your own dashboards alongside other business metrics. Combine link clicks with revenue, signups, or other KPIs.

Batch link creation

For large campaigns, create hundreds of tracked links programmatically. Loop through your URLs and create a tracked link for each with appropriate UTM parameters.

Related resources

Start building with the API

Free API access with 10 links and 2,500 clicks/month. Create your account and start integrating.

Get API access free