Introduction
Build URL shortening and analytics directly into your applications. Create short links, track engagement, and access detailed click data through a fast and reliable API.
Designed around REST principles, the lnqo API features predictable endpoints, JSON responses, bearer token authentication, and standard HTTP response codes for a seamless integration experience.
Base API URL
https://linky-cec9gkdfccftaxb8.uaenorth-01.azurewebsites.net
All requests must be made over HTTPS. HTTP requests will be automatically redirected to secure connections.
Authentication
Dashboard (Cookie)
Browser-based authentication
When you sign in with Google, the API sets an httpOnly jwt cookie.
The lnqo dashboard sends this automatically with credentials: "include".
fetch("https://linky-cec9gkdfccftaxb8.uaenorth-01.azurewebsites.net/api/v1/auth/me", {
credentials: "include"
})Pro API (Bearer)
Server-side authentication
Server-side integrations use an API key in the Authorization header.
Create keys from the dashboard API keys page (Pro plan only).
Authorization: Bearer YOUR_API_KEY
Content-Type: application/jsonPlan limits
| Feature | Free | Pro |
|---|---|---|
| Short links | 100 | Unlimited |
| Click history | 30 days | 365 days |
| City analytics | — | Included |
| REST API (Bearer) | — | Included |
Exceeding link limits returns HTTP 403 with a message like Link limit reached (100). Upgrade to Pro for unlimited links. Pro-only features return 403 when called on a Free plan.
Keep your API keys completely private. Do not commit keys to public repositories or expose them in client-side applications (like single-page React codebases running on public web browsers).
/:shortCodePublic AccessPublicRedirect Short URL
Resolves a shortened link and redirects the browser to the destination URL. Click analytics (device, browser, region, referrer) are recorded asynchronously. Public — no authentication required.
Example
const response = await fetch("https://linky-cec9gkdfccftaxb8.uaenorth-01.azurewebsites.net/abc123?shortCode=VALUE");
const data = await response.json();
console.log(data);Response
HTTP 302 redirect (no JSON body)
Query Parameters
| Parameter | Type | Required |
|---|---|---|
shortCode The unique short identifier (path segment). Example: GET {baseUrl}/abc123 | string | yes |
Response Details
HTTP 302 Found redirect to the original destination URL. No JSON body. Cache-Control headers prevent intermediary caches from swallowing analytics.
/api/v1/urlAuth Key Req.AuthCreate Short URL
Creates a shortened link for the authenticated user. Dashboard (browser): send requests with credentials so the httpOnly JWT cookie is included. Pro API: use Authorization: Bearer <API_KEY> from API keys created in the dashboard. Free plan: up to 100 links; Pro: unlimited. Returns 403 when the link quota is exceeded.
Example
const response = await fetch("https://linky-cec9gkdfccftaxb8.uaenorth-01.azurewebsites.net/api/v1/url"
, {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"originalUrl": "VALUE"
})
}
);
const data = await response.json();
console.log(data);Response
{
"status": "success",
"data": {
"url": {
"_id": "65a1b2c3d4e5f6789012345",
"shortCode": "abc123",
"originalUrl": "https://example.com/very-long-url",
"clicks": 0,
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z"
},
"shortUrl": "https://linky-cec9gkdfccftaxb8.uaenorth-01.azurewebsites.net/abc123"
}
}HTTP Headers
| Header Name | Type | Required |
|---|---|---|
Authorization Pro API: Bearer token from an API key. Format: Bearer <API_KEY>. Dashboard requests use the session cookie instead. | string | yes |
Content-Type Must be application/json | string | yes |
JSON Request Body
| Field | Type | Required |
|---|---|---|
originalUrl Full destination URL including http:// or https:// protocol. | string | yes |
Response Details
201 Created with status success and data containing the url document and absolute shortUrl.
/api/v1/urlAuth Key Req.AuthList Short URLs
Returns all short links owned by the authenticated user. Dashboard (browser): send requests with credentials so the httpOnly JWT cookie is included. Pro API: use Authorization: Bearer <API_KEY> from API keys created in the dashboard.
Example
const response = await fetch("https://linky-cec9gkdfccftaxb8.uaenorth-01.azurewebsites.net/api/v1/url",
{
headers: {
"Authorization": "Bearer YOUR_API_KEY"
}
}
);
const data = await response.json();
console.log(data);Response
{
"status": "success",
"data": [
{
"_id": "65a1b2c3d4e5f6789012345",
"shortCode": "abc123",
"originalUrl": "https://example.com/page",
"clicks": 42,
"createdAt": "2024-01-10T08:00:00.000Z",
"updatedAt": "2024-01-15T09:00:00.000Z"
}
]
}HTTP Headers
| Header Name | Type | Required |
|---|---|---|
Authorization Pro API: Bearer token from an API key. Format: Bearer <API_KEY>. Dashboard requests use the session cookie instead. | string | yes |
Response Details
200 OK with status success and data as an array of URL documents (shortCode, originalUrl, clicks, timestamps).
/api/v1/url/:shortCodeAuth Key Req.AuthDelete Short URL
Permanently deletes a short link and its click records. Dashboard (browser): send requests with credentials so the httpOnly JWT cookie is included. Pro API: use Authorization: Bearer <API_KEY> from API keys created in the dashboard.
Example
const response = await fetch("https://linky-cec9gkdfccftaxb8.uaenorth-01.azurewebsites.net/api/v1/url/:shortCode",
{
method: "DELETE",
headers: {
"Authorization": "Bearer YOUR_API_KEY"
}
}
);
// 204 No Content on successResponse
HTTP 204 No Content (no JSON body)
HTTP Headers
| Header Name | Type | Required |
|---|---|---|
Authorization Pro API: Bearer token from an API key. Format: Bearer <API_KEY>. Dashboard requests use the session cookie instead. | string | yes |
Query Parameters
| Parameter | Type | Required |
|---|---|---|
shortCode Short code of the link to delete. | string | yes |
Response Details
204 No Content on success. 404 if the link is not found.
/api/v1/analytics/overviewAuth Key Req.AuthAnalytics Overview
Aggregated KPIs, click timeline, top links, and breakdowns for all owned links. Dashboard (browser): send requests with credentials so the httpOnly JWT cookie is included. Pro API: use Authorization: Bearer <API_KEY> from API keys created in the dashboard. Free plan click history is limited to 30 days — responses may include clamped: true when a longer period was requested.
Example
const response = await fetch("https://linky-cec9gkdfccftaxb8.uaenorth-01.azurewebsites.net/api/v1/analytics/overview",
{
headers: {
"Authorization": "Bearer YOUR_API_KEY"
}
}
);
const data = await response.json();
console.log(data);Response
{
"status": "success",
"data": {
"period": "30d",
"clamped": true,
"summary": {
"totalUrls": 12,
"totalClicks": 1250,
"clicksInPeriod": 340,
"clicksToday": 18,
"clicksLast7d": 120,
"clicksLast30d": 340,
"activeLinksInPeriod": 8
},
"timeline": [
{ "date": "2024-01-14", "clicks": 12 },
{ "date": "2024-01-15", "clicks": 18 }
],
"topLinks": [
{
"shortCode": "abc123",
"originalUrl": "https://example.com/page",
"clicks": 120,
"totalClicks": 342,
"createdAt": "2024-01-10T08:00:00.000Z"
}
],
"breakdowns": {
"deviceTypes": [{ "name": "mobile", "count": 200 }],
"browsers": [{ "name": "Chrome", "count": 150 }],
"referrers": [{ "name": "direct", "count": 90 }],
"regions": [{ "name": "US", "count": 120 }]
}
}
}HTTP Headers
| Header Name | Type | Required |
|---|---|---|
Authorization Pro API: Bearer token from an API key. Format: Bearer <API_KEY>. Dashboard requests use the session cookie instead. | string | yes |
Query Parameters
| Parameter | Type | Required |
|---|---|---|
period Time range: 24h, 7d, or 30d. Default: 30d | string | no |
limit Max top links to return. Default: 5, max: 50 | integer | no |
Response Details
200 OK with period, optional clamped flag, summary KPIs, timeline, topLinks, and breakdowns.
/api/v1/analytics/top-linksAuth Key Req.AuthTop Performing Links
Links ranked by clicks in the selected period. Dashboard (browser): send requests with credentials so the httpOnly JWT cookie is included. Pro API: use Authorization: Bearer <API_KEY> from API keys created in the dashboard.
Example
const response = await fetch("https://linky-cec9gkdfccftaxb8.uaenorth-01.azurewebsites.net/api/v1/analytics/top-links",
{
headers: {
"Authorization": "Bearer YOUR_API_KEY"
}
}
);
const data = await response.json();
console.log(data);Response
{
"status": "success",
"results": 2,
"period": "30d",
"data": [
{
"shortCode": "abc123",
"originalUrl": "https://example.com/page",
"clicks": 342,
"totalClicks": 342,
"createdAt": "2024-01-10T08:00:00.000Z"
},
{
"shortCode": "def456",
"originalUrl": "https://example.com/other",
"clicks": 287,
"totalClicks": 287,
"createdAt": "2024-01-12T14:30:00.000Z"
}
]
}HTTP Headers
| Header Name | Type | Required |
|---|---|---|
Authorization Pro API: Bearer token from an API key. Format: Bearer <API_KEY>. Dashboard requests use the session cookie instead. | string | yes |
Query Parameters
| Parameter | Type | Required |
|---|---|---|
period Time range: 24h, 7d, or 30d. Default: 30d | string | no |
limit Max items. Default: 10, max: 50 | integer | no |
Response Details
200 OK with results count, period, optional clamped, and data array ordered by clicks descending.
/api/v1/analytics/linksAuth Key Req.AuthPaginated Links Table
Paginated list of short links with sort options. Dashboard (browser): send requests with credentials so the httpOnly JWT cookie is included. Pro API: use Authorization: Bearer <API_KEY> from API keys created in the dashboard.
Example
const response = await fetch("https://linky-cec9gkdfccftaxb8.uaenorth-01.azurewebsites.net/api/v1/analytics/links",
{
headers: {
"Authorization": "Bearer YOUR_API_KEY"
}
}
);
const data = await response.json();
console.log(data);Response
{
"status": "success",
"page": 1,
"totalPages": 3,
"results": 2,
"total": 45,
"data": [
{
"shortCode": "abc123",
"originalUrl": "https://example.com/page",
"clicks": 342,
"createdAt": "2024-01-10T08:00:00.000Z",
"updatedAt": "2024-01-15T09:00:00.000Z"
}
]
}HTTP Headers
| Header Name | Type | Required |
|---|---|---|
Authorization Pro API: Bearer token from an API key. Format: Bearer <API_KEY>. Dashboard requests use the session cookie instead. | string | yes |
Query Parameters
| Parameter | Type | Required |
|---|---|---|
page Page index. Default: 1 | integer | no |
limit Links per page. Default: 20, max: 100 | integer | no |
sort Sort field: clicks (highest first) or createdAt (newest first). Default: createdAt | string | no |
Response Details
200 OK with page, totalPages, total, results, and data array.
/api/v1/analytics/recent-clicksAuth Key Req.AuthRecent Clicks Feed
Latest click events with device and region metadata. Dashboard (browser): send requests with credentials so the httpOnly JWT cookie is included. Pro API: use Authorization: Bearer <API_KEY> from API keys created in the dashboard. History window depends on plan (30d free, 365d pro).
Example
const response = await fetch("https://linky-cec9gkdfccftaxb8.uaenorth-01.azurewebsites.net/api/v1/analytics/recent-clicks",
{
headers: {
"Authorization": "Bearer YOUR_API_KEY"
}
}
);
const data = await response.json();
console.log(data);Response
{
"status": "success",
"results": 2,
"data": [
{
"shortCode": "abc123",
"deviceType": "mobile",
"browser": "Chrome",
"region": "US",
"referrer": "https://google.com",
"clickedAt": "2024-01-15T10:30:00.000Z"
},
{
"shortCode": "def456",
"deviceType": "desktop",
"browser": "Firefox",
"region": "UK",
"referrer": "direct",
"clickedAt": "2024-01-15T10:29:00.000Z"
}
]
}HTTP Headers
| Header Name | Type | Required |
|---|---|---|
Authorization Pro API: Bearer token from an API key. Format: Bearer <API_KEY>. Dashboard requests use the session cookie instead. | string | yes |
Query Parameters
| Parameter | Type | Required |
|---|---|---|
limit Max events. Default: 20, max: 100 | integer | no |
shortCode Filter to a single short code. | string | no |
Response Details
200 OK with results count and data array of click documents.
/api/v1/analytics/links/:shortCodeAuth Key Req.AuthLink Specific Breakdown
Per-link analytics: timeline and environment breakdowns. Dashboard (browser): send requests with credentials so the httpOnly JWT cookie is included. Pro API: use Authorization: Bearer <API_KEY> from API keys created in the dashboard. City breakdown requires Pro. Free plans may receive clamped: true for periods beyond 30 days.
Example
const response = await fetch("https://linky-cec9gkdfccftaxb8.uaenorth-01.azurewebsites.net/api/v1/analytics/links/:shortCode?shortCode=VALUE",
{
headers: {
"Authorization": "Bearer YOUR_API_KEY"
}
}
);
const data = await response.json();
console.log(data);Response
{
"status": "success",
"data": {
"period": "30d",
"clamped": true,
"url": {
"shortCode": "abc123",
"originalUrl": "https://example.com/original",
"shortUrl": "https://linky-cec9gkdfccftaxb8.uaenorth-01.azurewebsites.net/abc123",
"clicks": 342,
"createdAt": "2024-01-10T08:00:00.000Z",
"updatedAt": "2024-01-15T09:00:00.000Z"
},
"summary": {
"totalClicks": 342,
"clicksInPeriod": 120
},
"timeline": [
{ "date": "2024-01-14", "clicks": 8 },
{ "date": "2024-01-15", "clicks": 12 }
],
"breakdowns": {
"deviceTypes": [{ "name": "mobile", "count": 80 }],
"browsers": [{ "name": "Chrome", "count": 60 }],
"operatingSystems": [{ "name": "iOS", "count": 45 }],
"referrers": [{ "name": "direct", "count": 40 }],
"regions": [{ "name": "US", "count": 55 }],
"cities": [{ "name": "New York", "count": 20 }]
}
}
}HTTP Headers
| Header Name | Type | Required |
|---|---|---|
Authorization Pro API: Bearer token from an API key. Format: Bearer <API_KEY>. Dashboard requests use the session cookie instead. | string | yes |
Query Parameters
| Parameter | Type | Required |
|---|---|---|
shortCode Short code to analyze. | string | yes |
period Time range: 24h, 7d, or 30d. Default: 30d | string | no |
Response Details
200 OK with url metadata, summary, timeline, breakdowns, and optional clamped flag.