┌─────────────────┬────────────────────────────────────────────────────────────────────┐
│ Endpoint │ Description │
├─────────────────┼────────────────────────────────────────────────────────────────────┤
│ POST /shorten │ Create a shortened URL │
│ │ Content-Type: application/json │
│ │ Request: {"url": "https://example.com"} │
│ │ Response: {"short_url": "https://bckr.link/abc123"} │
├─────────────────┼────────────────────────────────────────────────────────────────────┤
│ GET /{shortUrl} │ Redirect to the original URL │
│ │ Example: GET /abc123 → 302 Redirect to https://example.com │
└─────────────────┴────────────────────────────────────────────────────────────────────┘
AUTH
The POST /shorten endpoint requires authentication via API key.
Include your API key with the X-API-Key header:
$ curl -X POST https://bckr.link/shorten \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY_HERE" \
-d '{"url": "https://example.com"}'
Generate a key
$ ./link-shortener api-key create --description "My application"