trak.sh docs

Getting Started

Create your first short link in seconds.

From the website

  1. Go to trak.sh
  2. Paste your long URL into the input field
  3. Click Shorten
  4. Copy the short link, share it, or customize the slug

No account required for basic shortening. Links created without an account expire after 30 days.

With a custom slug

Sign in with GitHub or Google, then:

  1. Shorten a URL on the homepage or dashboard
  2. Click Customize slug on the result
  3. Enter your preferred slug (e.g., my-link)

Free users: custom slugs must be 5+ characters and expire in 30 days. Pro users: custom slugs can be 3+ characters and are permanent.

From the API

curl -X POST https://trak.sh/api/v1/links \
  -H "Authorization: Bearer trak_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/my-long-url"}'

Response:

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "slug": "ab2cd",
  "shortUrl": "https://trak.sh/ab2cd",
  "destinationUrl": "https://example.com/my-long-url",
  "createdAt": "2026-04-03T12:00:00.000Z"
}

View analytics

Click any link in your dashboard to see:

  • Total clicks and unique visitors
  • Clicks over time chart (7d, 30d, 90d, or all time for Pro)
  • Referrers — where clicks come from
  • Countries — geographic distribution
  • Devices — mobile, desktop, tablet breakdown
  • Browsers — Chrome, Safari, Firefox, etc.
  • Hourly heatmap — when your audience is most active

Get an API key

  1. Sign in and go to Settings
  2. Under API Key, click Generate API Key
  3. Copy the key — it's shown only once

API access requires a Pro plan ($6/month or $49/year).

On this page