For developers
Create short links and read click statistics from your own tools.
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": "…" } }.
429 with a Retry-After header.401 missing, invalid, expired or revoked key · 403 key lacks the needed scope, or the account is disabled · 404 not found (also for links that belong to someone else) · 400 invalid request · 409 slug already taken.links:read (GET) and links:write (POST, PATCH, DELETE).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 }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 /links/{id}PATCH /links/{id} — any creation field except slug (slugs never change); clear_password: true removes the password.DELETE /links/{id} — also deletes its click history.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": [] } }