API Reference
Programmatic access to create and manage links
Access qklnk programmatically using our REST API. Create links, retrieve analytics, and manage your account.
Authentication
All API requests require authentication using a Bearer token. Generate an API token from your API Tokens page.
curl -H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json" \
https://qklnk.cc/api/v1/...
Token Permissions
When creating an API token, you can select which permissions to grant:
| Permission | Description |
|---|---|
read | List and view links and analytics |
create | Create new links and record events |
update | Update existing links |
delete | Delete links |
Requests made without the required permission will receive a 403 Forbidden response.
Base URL
https://qklnk.cc/api/v1
Endpoints
Get Current User
GET /api/v1/user
Returns information about the authenticated user.
Create Link
POST /api/v1/links
Create a new quick link. Requires create permission.
{
"destination": "https://example.com/page",
"utm_source": "api",
"utm_medium": "email",
"utm_campaign": "winter-sale",
"utm_content": "body_button",
"utm_term": "deal",
"domain": "example.com"
}
| Parameter | Type | Required | Description |
|---|---|---|---|
| destination | string | Yes | Target URL to redirect to |
| utm_source | string | No | UTM source parameter |
| utm_medium | string | No | UTM medium parameter |
| utm_campaign | string | No | UTM campaign parameter |
| utm_content | string | No | UTM content parameter |
| utm_term | string | No | UTM term parameter |
| domain | string | No | Custom domain (e.g. "example.com"). Uses team default if not specified |
{
"data": {
"id": 123,
"slug": "abc123",
"short_url": "https://qklnk.cc/abc123",
"destination": "https://example.com/page",
"clicks": 0,
"created_at": "2024-01-15T10:30:00Z"
}
}
List Links
GET /api/v1/links
Retrieve a paginated list of all quick links for the current team. Requires read permission.
{
"data": [...],
"meta": {
"current_page": 1,
"total": 50
}
}
Get Link
GET /api/v1/links/{slug}
Retrieve a single quick link with statistics. Requires read permission.
{
"data": {
"id": 123,
"slug": "abc123",
"destination": "https://example.com/page",
"clicks": 150,
"unique_visitors": 89
}
}
Update Link
PUT /api/v1/links/{slug}
Update an existing quick link. Requires update permission.
{
"destination": "https://example.com/new-page",
"utm_source": "api",
"utm_medium": "email",
"utm_campaign": "updated-campaign",
"utm_content": "footer_link",
"utm_term": "promo"
}
| Parameter | Type | Required | Description |
|---|---|---|---|
| destination | string | Yes | Target URL to redirect to |
| utm_source | string | No | UTM source parameter |
| utm_medium | string | No | UTM medium parameter |
| utm_campaign | string | No | UTM campaign parameter |
| utm_content | string | No | UTM content parameter |
| utm_term | string | No | UTM term parameter |
{
"data": {
"id": 123,
"slug": "abc123",
"destination": "https://example.com/new-page",
"utm_source": "api",
"utm_medium": "email",
"utm_campaign": "updated-campaign",
"utm_content": "footer_link",
"utm_term": "promo",
...
}
}
Get Analytics
GET /api/v1/analytics?days=7
Retrieve analytics summary for the current team.
Query Parameters:| Parameter | Type | Default | Description |
|---|---|---|---|
| days | integer | 7 | Number of days to include in analytics |
{
"data": {
"total_clicks": 1500,
"unique_visitors": 890,
"conversions": 120,
"revenue": 2999.99,
"top_links": [
{
"id": 123,
"slug": "abc123",
"destination": "https://example.com/page",
"clicks": 450
}
]
}
}
Get UTM Daily Conversions
GET /api/v1/analytics/utm/daily?from=2026-10-01&to=2026-10-31
Registrations and purchases from visits that carry a UTM source but no qklnk link, grouped by day and UTM values. Requires the read ability and the API access plan, and is scoped to the token's team.
| Parameter | Type | Default | Description |
|---|---|---|---|
| from | date (Y-m-d) | required | First UTC day |
| to | date (Y-m-d) | today (UTC) | Last UTC day. The range is at most 366 days, counting both ends |
| medium | string | all | Pass a value such as social to filter by medium |
| page | integer | 1 | Page number |
| per_page | integer | 100 | 1 to 500 |
{
"data": [
{
"day": "2026-10-26",
"source": "linkedin",
"medium": "social",
"campaign": "2026_10_26",
"content": null,
"registrations": 3.5,
"purchases": 0.0
}
],
"meta": {"current_page": 1, "per_page": 100, "last_page": 1, "total": 1}
}
dayis the UTC day of the event, not the visit day.registrationsandpurchasesare decimals weighted by attribution and keep their fraction (0.0). Repeat events of first-only types are skipped. Groups with no conversions are omitted.source,medium,campaignandcontentare the visit's raw values; null stays null, and null and an empty string are separate groups.- For pixel-recorded visits, a recognized referrer beats
utm_source(X arrives ast.co,x.comortwitter; LinkedIn aslinkedinwith mediumsocial;lnkd.inand app referrers as mediumreferral). contentis null for every pixel-recorded visit, because the pixel does not sendutm_content. Only visits left by a deleted link carry it.- Rows are ordered by
day,source,campaign,content, thenmedium, with null before any string.
Record Event
POST /api/v1/events/record
Record an event for conversion tracking.
Request Body:{
"visitor_id": "v_abc123xyz",
"event_name": "purchase",
"revenue": 99.99,
"name": "Premium Package",
"metadata": {
"product_id": "SKU-12345"
}
}
| Parameter | Type | Required | Description |
|---|---|---|---|
| visitor_id | string | Yes | Unique visitor identifier |
| event_name | string | Yes | Type of conversion event |
| revenue | number | No | Monetary value |
| name | string | No | Display name for the event (max 255 chars) |
| metadata | object | No | Additional data |
Response Format
All responses are in JSON format:
Success Response:{
"data": {
"id": 123,
"visitor_id": "v_abc123xyz",
"event_name": "purchase",
"revenue": 99.99,
"occurred_at": "2024-01-15T10:30:00Z",
"is_conversion": true
}
}
{
"message": "Validation failed",
"errors": {
"visitor_id": ["The visitor_id field is required."]
}
}
Rate Limiting
API requests are rate limited to 60 requests per minute. The following headers are included in responses:
X-RateLimit-Limit- Maximum requests per minuteX-RateLimit-Remaining- Remaining requests this minute
Getting Help
If you need additional API endpoints or have questions, please contact support.