URL shortlink management with Cloudflare KV storage
/create
Auth Required
Create a new shortlink
curl -X POST https://shortlink.autoviz.io/create \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"path": "/s/abc123", "value": "https://example.com/target"}'
Response:
{"success": true, "path": "/s/abc123", "value": "https://example.com/target"}
/?path={path}
Get shortlink data as JSON
curl "https://shortlink.autoviz.io/?path=/s/abc123"
Response:
{"path": "/s/abc123", "value": "https://example.com/target"}
/{any-path}
Redirect to target URL if shortlink exists
GET https://shortlink.autoviz.io/s/abc123
--> 302 Redirect to https://example.com/target
/health
Health check endpoint
curl https://shortlink.autoviz.io/health
Response:
{"status": "healthy", "environment": "production", "timestamp": "..."}
Shortlinks can use any path structure:
| Pattern | Example |
|---|---|
| Short codes | /s/abc123, /x/promo2024 |
| Hierarchical | /wheels/brand/model |
| Simple | /abc123 |
The /create endpoint requires an Authorization header:
Authorization: Bearer YOUR_API_TOKEN
Powered by Cloudflare Workers