For developers

API documentation

Create, manage, and pull analytics for your links programmatically with the Quik.mn REST API.

Base URL

All endpoints start from the following base URL:

https://quik.mn/api/v1

Authentication

On every request, include the API key from your dashboard in the Authorization header:

Authorization: Bearer qk_live_...

Never share your key with anyone. If it leaks, regenerate it from your dashboard.

Endpoints

POST /api/v1/links Create a new short link
GET /api/v1/links List your links
GET /api/v1/links/{id} Get a single link
PATCH /api/v1/links/{id} Update a link
DELETE /api/v1/links/{id} Delete a link
GET /api/v1/links/{id}/stats Link statistics
POST /api/v1/links/{id}/extend Extend expiry — body: {"days": 365} (1/7/30/90/180/365, max 1 year)
GET /api/v1/links/{id}/qr Get a QR code — ?format=png|svg&size=300&fg=0F172A&bg=FFFFFF
GET /api/v1/me Current account info

Parameters

POST /api/v1/links — request body fields:

url required The destination URL (http/https).
alias optional Custom short name (letters, digits, - and _; 1–64 characters). Also accepted if sent as "slug".
title optional Title (up to 200 characters).
expires_at optional Expiry time — a future date (e.g. 2026-12-31 23:59:59). Maximum 1 year; defaults to 1 year if omitted. Sending null on PATCH resets it to 1 year.
expire_days optional Or in days: 1/7/30/90/180/365. Simpler than expires_at.
on_duplicate optional When an active link to the same URL already exists: "reuse" (default — returns the existing link with a reused:true field) or "create" (creates a new one). A new link is always created when an alias is specified.

GET /api/v1/links — query parameters:

limit Number of items per page (1–100, default 25).
offset Number of rows to skip (pagination).
q Search — matches slug, title, and destination URL.

Error format

Every error returns an HTTP status code (401, 404, 409, 422, 429) and a consistent JSON structure:

{ "error": "alias_taken", "message": "That alias is reserved or already in use." }

Common codes: unauthorized (401), not_found (404), alias_taken (409), invalid_url / invalid_alias / invalid_expires_at (422), rate_limited (429).

Rate limits

60 requests per minute per API key
If you exceed it, a 429 rate_limited response is returned — wait a moment and try again.

Example request

cURL example for creating a short link:

curl -X POST https://quik.mn/api/v1/links \
  -H "Authorization: Bearer qk_live_xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/very/long/path",
    "alias": "promo",
    "title": "Хаврын кампанит ажил",
    "expires_at": "2026-12-31 23:59:59"
  }'
Get your API key
Create a key in the API section of your dashboard and get started right away.
Get API key