API documentation
Create, manage, and pull analytics for your links programmatically with the Quik.mn REST API.
All services
Every Quik.mn product — via REST API and the web.
Base URL
All endpoints start from the following base URL:
Authentication
On every request, include the API key from your dashboard in the Authorization header:
Never share your key with anyone. If it leaks, regenerate it from your dashboard.
Endpoints
Parameters
POST /api/v1/links — request body fields:
GET /api/v1/links — query parameters:
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 / invalid_starts_at (422), rate_limited (429).
Rate limits
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": "Spring campaign",
"expires_at": "2026-12-31 23:59:59"
}'
Webhook
Register an endpoint in the dashboard's Webhook section and we will POST JSON to your URL whenever a selected event happens. A 2xx response counts as success; otherwise we retry up to 3 times with 1 min → 10 min backoff. After 10 consecutive failures the webhook is automatically disabled.
Structure of every delivery (example):
{
"event": "link.created",
"created_at": "2026-07-18T09:30:00+00:00",
"data": {
"link": {
"id": 42, "slug": "promo", "short_url": "https://quik.mn/promo",
"long_url": "https://example.com/very/long/path", "title": "Spring campaign",
"clicks": 0, "active": true, "state": "ok",
"created_at": "2026-07-18 09:30:00", "expires_at": "2027-07-18 09:30:00"
}
}
}
Verifying the signature
Every delivery arrives with these headers: X-Quik-Event (the event name), X-Quik-Signature — sha256=HMAC_SHA256(body, secret). The secret is shown only once, when the webhook is created. ALWAYS verify the signature over the raw request body using a constant-time comparison:
<?php
// PHP — verify the signature over the raw request body
$payload = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_QUIK_SIGNATURE'] ?? '';
$expected = 'sha256=' . hash_hmac('sha256', $payload, $secret);
if (!hash_equals($expected, $signature)) {
http_response_code(401);
exit('invalid signature');
}
$event = json_decode($payload, true);
// $event['event'], $event['data'] ...
http_response_code(200);
// Node.js (Express) — verify the signature over the raw request body
const crypto = require('crypto');
app.post('/quik-webhook', express.raw({ type: 'application/json' }), (req, res) => {
const signature = req.get('X-Quik-Signature') || '';
const expected = 'sha256=' +
crypto.createHmac('sha256', secret).update(req.body).digest('hex');
const a = Buffer.from(expected), b = Buffer.from(signature);
if (a.length !== b.length || !crypto.timingSafeEqual(a, b)) {
return res.status(401).send('invalid signature');
}
const event = JSON.parse(req.body); // event.event, event.data ...
res.sendStatus(200);
});
Limits: Free 1, Pro 3, Business 10 webhooks. The endpoint must be a publicly reachable http/https URL (private-network addresses are blocked).