Developers

API

With the 4l.vc API, programs can create short links, list your links, read their click counts and delete them.

Getting started

Sign in and create a key under “API keys” on your dashboard. Send the key (it starts with 4lvc_) in the Authorization header of every request.

Endpoints

Every URL starts with https://4l.vc/api/v1.

POST/linksCreate a short link. Body {"url": "…"}
GET/linksList your links (?limit=1–100, ?offset)
GET/links/{slug}One link with its click breakdown (per day, referrer, country, device)
DELETE/links/{slug}Delete a link (cannot be undone)

Examples

# Create a link
curl -X POST https://4l.vc/api/v1/links \
  -H "Authorization: Bearer $FOURL_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/very/long/path"}'

# Response
{"data": {"slug": "Qx7mP", "short": "https://4l.vc/Qx7mP", "url": "https://example.com/very/long/path",
          "status": "active", "clicks": 0, "createdAt": "2026-10-09T12:00:00.000Z", "lastClickAt": null}}

# Click counts
curl https://4l.vc/api/v1/links/Qx7mP -H "Authorization: Bearer $FOURL_KEY"

Responses and errors

Success returns {"data": …}. Failures return a 4xx or 5xx status with {"error": {"code", "message"}}. Send Accept-Language: en for English messages.

401unauthorizedMissing or wrong API key
400invalid_urlThat URL cannot be shortened
404not_foundNo such link, or not yours

Limits

There is no rate limit. A key can only touch its own account's links.