REST API

Sortify API Reference

Create, manage, and analyze short links programmatically using API keys generated from your dashboard.

Base URL

https://your-domain.com

Authentication

Include your API key in every request using the x-api-key header.

Header

x-api-key: sk_sortify_xxxxxxxxxxxxxxxxx

Analytics

GET
GET /api/v1/analytics/:slug

Get detailed analytics for a short link — total clicks, browser breakdown, device breakdown, countries, and a click timeline.

Response

{
  "slug": "my-link",
  "totalClicks": 42,
  "browsers": { "Chrome": 30, "Firefox": 8, "Safari": 4 },
  "devices": { "Desktop": 35, "Mobile": 7 },
  "countries": { "United States": 20, "India": 12 },
  "clicksByDay": [
    { "date": "2024-01-15", "clicks": 10 },
    { "date": "2024-01-16", "clicks": 32 }
  ]
}

Ready to integrate?

Generate your API key from the dashboard to get started.

Get API Key