Traqly API

Create short links, list your links, and read their click counts directly from your own apps and scripts — no dashboard needed. The API is available on the Business plan; generate a key under Settings → API.

Authentication

Every request must include your API key as a Bearer token in theAuthorizationheader:

Authorization: Bearer YOUR_API_KEY

Keep your API key secret — treat it like a password. Anyone with it can create links on your account. You can revoke a key any time in Settings → API.

Base URL

https://traqly.vercel.app/api/v1

Endpoints

POST/api/v1/links

Create a short link in your workspace.

Body parameters

  • url required — the destination URL.
  • slug optional — your custom slug (letters, numbers, hyphens). Auto-generated if omitted.
  • title optional — a label for the link.
Request — cURL
curl -X POST https://traqly.vercel.app/api/v1/links \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com", "slug": "my-link"}'
Response — 201 Created
{
  "id": "clx9a1b2c3...",
  "slug": "my-link",
  "shortUrl": "https://traqly.vercel.app/my-link",
  "url": "https://example.com",
  "title": null,
  "clicks": 0,
  "createdAt": "2026-05-31T12:00:00.000Z"
}
GET/api/v1/links

List your workspace's links, newest first, each with its total click count.

Query parameters

  • limit optional — 1–100, default 50.
Request — cURL
curl https://traqly.vercel.app/api/v1/links?limit=50 \
  -H "Authorization: Bearer YOUR_API_KEY"
Response — 200 OK
{
  "links": [
    {
      "id": "clx9a1b2c3...",
      "slug": "my-link",
      "shortUrl": "https://traqly.vercel.app/my-link",
      "url": "https://example.com",
      "title": null,
      "clicks": 142,
      "createdAt": "2026-05-31T12:00:00.000Z"
    }
  ]
}

Rate limits

There is no hard rate limit today. Please keep requests reasonable (a few per second); published per-key limits are coming. Each call increments your key's request counter, visible in Settings → API.

Errors

Errors return the appropriate HTTP status with a JSON body:

{ "error": "This slug is already taken." }
CodeMeaning
400Bad request — invalid JSON, missing/invalid url, or bad slug.
401Missing or invalid API key (or the key was revoked).
409The requested slug is already taken.
500Something went wrong on our side — retry shortly.