lyz.bz REST API
Use the API to create and manage links from your own software: back offices, CRMs, e-commerce, automations (Zapier, Make, n8n). Available from the Pro plan.
Create an API keyAuthentication
Create a key in the API section of the dashboard and send it in the Authorization header of every request. Keys don’t expire: revoke them from the dashboard when no longer needed.
Authorization: Bearer lyz_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Endpoints
| POST | /api/v1/links | Create a link. Body: url (required), slug, domain, title, password, expires_at (ISO 8601). |
| GET | /api/v1/links?limit=100 | Links from the most recent, with total clicks (up to 500). |
| GET | /api/v1/links/{id} | One link with total clicks. The id is the alias for lyz.bz, domain:alias for custom domains. |
| PATCH | /api/v1/links/{id} | Update url, title, password, remove_password, expires_at (null = no expiry). |
| DELETE | /api/v1/links/{id} | Delete the link, QR code and analytics. Returns 204. |
| GET | /api/v1/links/{id}/stats?days=30 | Clicks, unique visitors and scans per day; hours, countries, devices, systems, browsers, referrers. days: 7, 30, 90, 365. |
| GET | /api/v1/domains | The account’s custom domains and their status. |
POST /api/v1/links
curl -X POST https://lyz.bz/api/v1/links \
-H "Authorization: Bearer $LYZ_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/summer?utm_source=newsletter", "slug": "summer", "title": "Summer sale"}'HTTP/1.1 201 Created
{
"data": {
"id": "summer",
"short_url": "https://lyz.bz/summer",
"domain": null,
"slug": "summer",
"url": "https://example.com/summer?utm_source=newsletter",
"title": "Summer sale",
"password_protected": false,
"expires_at": null,
"suspended": false,
"created_at": "2026-11-12T10:00:00.000Z",
"updated_at": "2026-11-12T10:00:00.000Z",
"clicks": 0
}
}GET /api/v1/links/summer/stats?days=7
{
"data": {
"days": 7,
"totals": { "clicks": 412, "qr": 96, "visitors": 351 },
"daily": [{ "day": "2026-11-06", "clicks": 51, "qr": 12, "visitors": 44 }, …],
"hours": [3, 1, 0, …],
"countries": { "IT": 380, "CH": 21, "DE": 11 },
"devices": { "mobile": 301, "desktop": 104, "tablet": 7 },
"os": { "iOS": 170, "Android": 131, "Windows": 64, "macOS": 47 },
"browsers": { "Safari": 160, "Chrome": 190, "Instagram": 41, "Firefox": 21 },
"referrers": { "instagram.com": 140, "qr": 96, "direct": 120, "newsletter.example": 56 }
}
}Limits
Pro: 1,000 requests per day; Business: 20,000. Above the limit the response is 429. New links count towards the plan’s monthly quota.
Errors
Errors return an HTTP status and a JSON body { "error": "code" }.
| 401 | missing_api_key, invalid_api_key |
| 403 | plan_required, plan_protect, plan_edit |
| 404 | not_found |
| 409 | slug_taken, slug_reserved |
| 422 | invalid_request, invalid_url, blocked_url, slug_invalid, domain_invalid, expiry_invalid |
| 429 | rate_limited, monthly_quota_exceeded |
| 503 | edge, stats_unavailable |