POST /api/links — Create a Short Link
Send JSON with targetUrl (required) and optional customSlug, title, expiresInSeconds, maxClicks, and password. Returns HTTP 201 with shortUrl, previewUrl, status, and timestamps.
Automate short link creation, custom slugs, expiration rules, QR code SVGs, and real-time analytics directly from curl, Node.js, Python, Go, or shell scripts.
Try Interactive Web UI →curl -X POST https://sniq.top/api/links \
-H "Content-Type: application/json" \
-d '{
"targetUrl": "https://example.com/product-launch",
"customSlug": "launch",
"expiresInSeconds": 604800,
"maxClicks": 500
}'
Send JSON with targetUrl (required) and optional customSlug, title, expiresInSeconds, maxClicks, and password. Returns HTTP 201 with shortUrl, previewUrl, status, and timestamps.
Returns total clicks, unique visitors, 7-day daily click counts, top referrers, browser breakdown, and OS distribution in clean JSON.
Embed or download an instant crisp SVG QR code for any shortened slug by requesting /api/links/:slug/qr.svg (append ?download=1 for attachment headers).
Sniq uses HTTP 302 Found with Cache-Control: no-store so click analytics, link pausing, click limits, and expiration rules take effect instantaneously.
Yes. Every link exposes /api/links/:slug/qr.svg which returns standard image/svg+xml markup ready for <img> tags or direct download.