Sniq sniq.top
JSON REST API • Zero SDK Required

Sniq Developer REST API

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 →

Quickstart Example

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
  }'

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.

GET /api/links/:slug/stats — Retrieve Click Analytics

Returns total clicks, unique visitors, 7-day daily click counts, top referrers, browser breakdown, and OS distribution in clean JSON.

GET /api/links/:slug/qr.svg — Vector QR Code Endpoint

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).

Frequently Asked Questions

What HTTP status code does Sniq use for redirects?

Sniq uses HTTP 302 Found with Cache-Control: no-store so click analytics, link pausing, click limits, and expiration rules take effect instantaneously.

Can I generate QR codes directly via URL?

Yes. Every link exposes /api/links/:slug/qr.svg which returns standard image/svg+xml markup ready for <img> tags or direct download.