API · v1

API reference

Create and manage short links programmatically. The API is versioned under /api/v1 and authenticated with a Bearer API key.

Base URL
https://lali.lu
Auth
Bearer <api-key>
Format
application/json

Authentication

Every request must include your secret key as a Bearer token. API access is included on the Growth and Premium plans.

  1. Open Settings → API and click New key.
  2. Copy the key — it looks like lali_xxxxxxxxxxxx… and is shown only once (only a hash is stored). If you lose it, revoke it and create a new one.
bash
Authorization: Bearer lali_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Keep your key secret — treat it like a password. Revoked or expired keys return 401. All operations are scoped to the key’s owner: you only ever see and modify your own links.

Errors

Errors use a consistent envelope and standard HTTP status codes.

json
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "Validation failed.",
    "details": { }
  }
}
StatusCodeWhen
400BAD_REQUESTInvalid body/params, or an invalid/reserved destination or alias.
401UNAUTHORIZEDMissing, invalid, revoked, or expired key.
402LIMIT_EXCEEDED / FEATURE_LOCKEDPlan link limit hit, or a field needs a feature your plan lacks.
403FORBIDDENThe public API is disabled.
409CONFLICTThe custom alias is already taken.
429RATE_LIMITEDToo many requests.

Rate limits

Each key is limited to 60 requests / 60 s. Responses carry X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers; over-limit requests return 429.