linklazy

For developers

LinkLazy API

Create short links and read click statistics from your own tools.

Authentication

Create a key under Dashboard → API keys, then send it as a bearer token. Keys are shown once, can be limited to read-only, and can be revoked at any time.

curl https://linklazy.com/api/v1/links \
  -H "Authorization: Bearer ll_live_xxxxxxxxxxxx"

Every response is JSON. Errors look like { "error": { "code": "invalid_key", "message": "…" } }.

Limits and errors

List links

GET /links — query: page, per_page (max 100), q, folder, tag.

{ "data": [ { "id": "…", "slug": "sale", "short_url": "https://linklazy.com/l/sale",
    "destination_url": "https://example.com/sale", "click_count": 12, … } ],
  "page": 1, "per_page": 25, "total": 1 }

Create a link

POST /links — only destination_url is required. Optional: slug, title, folder, tags, expires_at (ISO date), max_clicks, password, is_active. Unknown fields are rejected.

curl -X POST https://linklazy.com/api/v1/links \
  -H "Authorization: Bearer ll_live_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"destination_url":"https://example.com/sale","slug":"sale","tags":["promo"]}'

Returns 201 with the new link. Destinations must be public http(s) URLs; other URL shorteners and blocked domains are refused.

Get, update, delete

Click statistics

GET /links/{id}/stats?days=30 (1–365). Counts exclude bots and link-preview fetchers. Days are UTC. "Uniques" are summed per day (one person on two days counts twice).

{ "data": { "days": 30, "from": "2026-09-17",
    "totals": { "clicks": 120, "uniques": 87, "qr": 14 },
    "daily": [ { "day": "2026-10-15", "clicks": 9, "uniques": 7 } ],
    "countries": [ { "key": "BD", "clicks": 60 } ],
    "devices": [], "browsers": [], "referrers": [], "sources": [] } }