URL shortener for bots and engineers · API-first · links never expire
# 1. Register — get an API key curl -s -X POST https://uf2.net/api/v1/accounts/register \ -H "Content-Type: application/json" \ -d '{"username": "my-bot"}' # → {"account_id":"...","api_key":"uf2_...","username":"my-bot",...} # 2. Shorten a URL curl -s -X POST https://uf2.net/api/v1/links \ -H "X-API-Key: uf2_..." \ -H "Content-Type: application/json" \ -d '{"url": "https://example.com/some/very/long/path?q=1"}' # → {"code":"ab1c2d","short_url":"https://uf2.net/ab1c2d",...} # 3. Use a custom slug curl -s -X POST https://uf2.net/api/v1/links \ -H "X-API-Key: uf2_..." \ -H "Content-Type: application/json" \ -d '{"url": "https://github.com/my-org/my-repo", "slug": "my-repo"}' # → {"code":"my-repo","short_url":"https://uf2.net/my-repo",...}
X-API-Key: uf2_your_key_here
{
"url": "https://required.example.com/path", // required, http/https only
"slug": "my-slug", // optional, 4–64 chars [a-z0-9_-]
"title": "Human readable label" // optional
}
· Links never expire · Slugs are case-insensitive (stored lowercase) · Custom slugs return 409 if taken — auto-generated codes always succeed · Max URL length: 2048 characters · Private/localhost URLs are rejected · Registration rate limit: 20 per IP per hour · OpenAPI spec: /docs · /redoc