Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Andr21Da16/Quikko/llms.txt

Use this file to discover all available pages before exploring further.

The Analytics API exposes aggregated click statistics stored in InfluxDB. Query totals broken down by country, device type, and browser. Time ranges of 24h, 7d, and 30d are supported — Pro plan is required for the 7d and 30d ranges. Export to CSV for spreadsheet analysis in Excel or Google Sheets. All endpoints require authentication.
Free plan users are restricted to the 24h range. Requesting 7d or 30d without a Pro plan returns 403 PLAN_RANGE_NOT_ALLOWED. Upgrade your plan via PATCH /api/v1/auth/me/plan to unlock extended ranges.

GET /api/v1/analytics/stats

GET /api/v1/analytics/stats Returns aggregated click statistics for the authenticated user. Provide a shortCode to query a single URL, or omit it for an overview of all your URLs combined.

Query parameters

shortCode
string
Short code of the URL to query (e.g. xYz12A). Omit to get an aggregate overview across all your URLs. Returns 403 FORBIDDEN if the code exists but belongs to another user.
range
string
Time range for the query. One of 24h, 7d, or 30d. Defaults to 24h. Free plan users may only use 24h.

Response — 200 OK

range
string
The time range used for this response — "24h", "7d", or "30d".
stats
object
Aggregated click statistics for the requested range.

Error codes

HTTPCodeWhen
400VALIDATION_ERRORInvalid range value or malformed parameters
401AUTH_TOKEN_INVALIDMissing or invalid Bearer token
403FORBIDDENshortCode belongs to another user
403PLAN_RANGE_NOT_ALLOWEDFree plan user requested 7d or 30d range
# Overview stats for all your URLs over the last 24 hours (default)
curl -s "http://localhost:8080/api/v1/analytics/stats" \
  -H "Authorization: Bearer <access-token>"

# Stats for a specific URL over the last 7 days (Pro plan required)
curl -s "http://localhost:8080/api/v1/analytics/stats?shortCode=xYz12A&range=7d" \
  -H "Authorization: Bearer <access-token>"

GET /api/v1/analytics/stats/export

GET /api/v1/analytics/stats/export Exports the same statistics as GET /api/v1/analytics/stats as a downloadable CSV file. Accepts identical query parameters and enforces the same plan/ownership validations. The success response is a raw CSV file — not the standard JSON envelope. The file is UTF-8 BOM encoded for seamless opening in Microsoft Excel without manual encoding configuration. Error responses (4xx/5xx) still use the standard JSON envelope. The response filename follows the pattern: stats-<label>-<range>.csv, where label is the shortCode or "overview" for all-URL exports.

Query parameters

shortCode
string
Short code of the URL to export. Omit for an all-URL overview export.
range
string
Time range — 24h, 7d, or 30d. Defaults to 24h. Free plan users may only use 24h.

Response — 200 OK

A raw CSV file download with headers:
Content-Type: text/csv; charset=utf-8
Content-Disposition: attachment; filename="stats-overview-24h.csv"

Error codes

HTTPCodeWhen
400VALIDATION_ERRORInvalid range value or malformed parameters
401AUTH_TOKEN_INVALIDMissing or invalid Bearer token
403FORBIDDENshortCode belongs to another user
403PLAN_RANGE_NOT_ALLOWEDFree plan user requested 7d or 30d
Use -O with curl to save the file using the server-provided filename from Content-Disposition.
# Download a 30-day CSV export for a specific URL (Pro plan required)
curl -s -O -J \
  "http://localhost:8080/api/v1/analytics/stats/export?shortCode=xYz12A&range=30d" \
  -H "Authorization: Bearer <access-token>"
# Saves as: stats-xYz12A-30d.csv

# Download an overview CSV for the last 24 hours
curl -s -O -J \
  "http://localhost:8080/api/v1/analytics/stats/export?range=24h" \
  -H "Authorization: Bearer <access-token>"
# Saves as: stats-overview-24h.csv

Build docs developers (and LLMs) love