Documentation

How to use shortn — manually and via API. Simple, predictable, no bloat.

Web usage

  1. Go to shortn.pages.dev
  2. Paste a long URL (http/https)
  3. Optional: set a custom slug (3–32, a–z 0–9 _ -)
  4. Click Shorten → copy/share/QR

API

POST /api/create

curl -X POST https://shortn.pages.dev/api/create \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/long","custom":"demo"}'

Response 201:

{
  "shortUrl": "https://shortn.pages.dev/demo",
  "slug": "demo",
  "clicks": 0
}

GET /api/links

curl https://shortn.pages.dev/api/links

GET /api/stats

curl https://shortn.pages.dev/api/stats

GET /api/check?slug=...

curl "https://shortn.pages.dev/api/check?slug=demo"

Rate limits

Notes

Redirects are 302. Clicks increment on each visit. Slugs are lowercase. Reserved paths are blocked.