Developer API
Create and manage short links programmatically over a REST API (server-to-server). Generate a key in the dashboard → Developer API. 1,000 free calls per month.
Authentication
Each request carries Authorization: Bearer lk_live_…. Responses include X-RateLimit-Remaining; when the quota is used up you get 429.
Create a short link
POST /api/v1/links
curl -X POST https://link.luvai.net/api/v1/links \
-H "Authorization: Bearer lk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"target_url": "https://example.com.tw/sale",
"slug": "summer",
"title": "Summer sale",
"escape_inapp": true,
"utm": { "source": "ig", "medium": "bio" }
}'
# 201 -> { "ok": true, "id": 42, "slug": "summer",
# "short_url": "https://link.luvai.net/summer" }Fields: target_url (required), slug (blank = random), title, mode (simple|ab|device), variants, redirect_type (301|302), og{title,description,image}, pixel_fb/ga/gtm/tiktok/line, escape_inapp, expires_at (ISO), utm, password. Destinations are auto-scanned for phishing/malware.
List / get / delete
curl https://link.luvai.net/api/v1/links?limit=50 \
-H "Authorization: Bearer lk_live_YOUR_KEY"
curl https://link.luvai.net/api/v1/links/42 \
-H "Authorization: Bearer lk_live_YOUR_KEY"
curl -X DELETE https://link.luvai.net/api/v1/links/42 \
-H "Authorization: Bearer lk_live_YOUR_KEY"Error codes
401 key missing/invalid/revoked · 403 link cap exceeded · 404 not found (or not your link) · 409 slug taken/reserved · 429 monthly quota used up · 400 bad params (incl. destination failing the safety scan).
← Back to dashboard