01Authentication
Find your API key in Dashboard → Settings. Send it as a Bearer token with every request.
Authorization: Bearer sly_xxxxxxxxxxxxxxxxxxxxxxxx
Keep your key secret. Treat it like a password and never put it in client-side code or public repositories.
02Create a link
POST/api/v1/links
curl -X POST https://your-domain/api/v1/links \ -H "Authorization: Bearer $SLY_KEY" \ -H "Content-Type: application/json" \ -d '{"url":"https://example.com/long","alias":"launch","tags":["campaign"], "utm":{"source":"newsletter","medium":"email"}}'
Optional fields: title, alias, tags, utm, expiresAt (ISO date), and on Pro+: password, maxClicks, iosUrl, androidUrl.
{ "link": { "id": 12, "code": "launch", "shortUrl": "https://your-domain/launch",
"url": "https://example.com/long?utm_source=newsletter&utm_medium=email", "clicks": 0 } }03List links
GET/api/v1/links?q=search&tag=campaign&page=1&per=25&sort=clicks
Search, filter by tag, paginate and sort by clicks or date.
04Update or delete a link
PATCH/api/v1/links/:id
{ "url": "https://new-destination.com", "active": true }DELETE/api/v1/links/:id
05Link statistics
GET/api/v1/links/:id/stats?days=30
Returns totals, unique visitors, daily series, hourly distribution, countries, devices, OS, browsers and referrers.
06QR codes
GET/api/v1/qr?text=https://your-domain/launch&size=512&fg=6a4cff&bg=ffffff&format=svg
Returns a PNG by default, or SVG with format=svg.
07Rate limits
Free500requests / day
Pro10,000requests / day
Business100,000requests / day
Exceeding the limit returns 429. Errors return JSON: {"error": "message", "code": "OPTIONAL_CODE"}.