Quickstart

Create a link

bash
curl -X POST https://rzwn.link/api/links \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/some/long/path",
    "slug": "example",
    "title": "Example link"
  }'

slug and title are both optional. Omit slug to get a random 7-character one.

json
{
  "id": 1,
  "slug": "example",
  "url": "https://example.com/some/long/path",
  "shortUrl": "https://rzwn.link/example",
  "title": "Example link",
  "enabled": true,
  "clickCount": 0,
  "lastClickedAt": null,
  "expiresAt": null,
  "createdAt": "2026-07-25T00:00:00.000Z",
  "updatedAt": "2026-07-25T00:00:00.000Z"
}

Visit it

Visiting shortUrl redirects (307) to url and logs a click. Open https://rzwn.link/example in a browser to try it.

Check stats

bash
curl https://rzwn.link/api/links/example/stats \
  -H "Authorization: Bearer $API_TOKEN"

Returns totals, a day-by-day click breakdown, top referrers/countries, and device/browser/OS splits. See Stats for the full response shape.

Every /api/* request needs the Authorization header above. See Authentication.