Developer Platform

TrimLynk Developer Hub

Integrate programmatic URL shortening, dynamic QR code generation, AI analytics, and webhooks into your applications.

TrimLynk Instant Free Shortening (v1)

POST/v1/free-urls/shortenPublic / No Auth

Create an instant short link anonymously without an API key.

Request Payload
{
  "longUrl": "https://example.com/product/launch-2026",
  "customCode": "my-campaign"
}
200 / 201 Response
{
  "shortCode": "my-campaign",
  "shortUrl": "https://trimlynk.com/my-campaign",
  "longUrl": "https://example.com/product/launch-2026",
  "expiresAt": "2026-09-04T12:00:00.000Z"
}

TrimLynk Authenticated Link Management (v1)

POST/v1/urls Auth Required

Create an advanced short link with custom slug, password protection, expiration, and pixels.

Request Payload
{
  "title": "Spring Campaign Promo",
  "longUrl": "https://example.com/spring-sale",
  "customUrl": "spring-promo",
  "password": "secretPassword123",
  "utmSource": "newsletter",
  "utmMedium": "email",
  "expiresAt": "2026-12-31T23:59:59.000Z"
}
200 / 201 Response
{
  "id": "cuid_link123",
  "title": "Spring Campaign Promo",
  "shortUrl": "spring-promo",
  "originalUrl": "https://example.com/spring-sale",
  "hasPassword": true,
  "currentClicks": 0,
  "isActive": true
}
GET/v1/urls Auth Required

Retrieve all shortened links for the authenticated user.

200 / 201 Response
[
  {
    "id": "cuid_link123",
    "title": "Spring Campaign Promo",
    "shortUrl": "spring-promo",
    "currentClicks": 142,
    "createdAt": "2026-08-28T08:00:00.000Z"
  }
]
DELETE/v1/urls/:id Auth Required

Delete a shortened link by ID.

200 / 201 Response
{
  "success": true
}

TrimLynk Analytics & Link Intelligence (v1)

GET/v1/clicks/analytics/:urlId Auth Required

Fetch aggregated click count, geo country stats, browser, and device metrics.

200 / 201 Response
{
  "totalClicks": 320,
  "uniqueVisitors": 285,
  "countryStats": [
    {
      "country": "United States",
      "count": 140
    },
    {
      "country": "India",
      "count": 95
    }
  ],
  "deviceStats": [
    {
      "device": "mobile",
      "count": 190
    },
    {
      "device": "desktop",
      "count": 130
    }
  ]
}
POST/v1/analytics-ai/query Auth Required

Ask natural language questions about your link metrics powered by Gemini & GPT-4o.

Request Payload
{
  "question": "Which country generated the most clicks this week?"
}
200 / 201 Response
{
  "answer": "United States generated the most engagement with 140 clicks (44% of total traffic), followed by India with 95 clicks.",
  "data": {
    "topCountry": "United States",
    "count": 140
  }
}