UL9UL9

API Docs

Base URL: https://api.ul9.me · Auth: Authorization: Bearer ul9_... · OpenAPI spec

POST   /api/v1/links           create   scope links:write
GET    /api/v1/links           list     scope links:read
PATCH  /api/v1/links/{id}      update   scope links:write
DELETE /api/v1/links/{id}      disable  scope links:write
GET    /api/v1/stats           totals   scope stats:read
GET    /api/v1/analytics?days=7 breakdown scope stats:read

POST /api/v1/links
{"url":"https://example.com","alias":"optional","domain":"ul9.me",
  "expiry_days":30,"max_clicks":1000,"password":"optional"}

Rate limit: 120 requests/minute per key. Keys and scopes: Admin → API Keys.

Authentication and scopes

Send Authorization: Bearer ul9_... with every request. Keys are created in the admin console with scopes links:read, links:write and stats:read; revoked or rotated keys stop working immediately. Never expose keys in browser code.

Errors

2xx on success; 400/422 for invalid input, 401/403 for auth, 404 for missing resources, 429 when rate limited. Errors are JSON: {"detail": "..."}. On 429 wait as instructed and retry without concurrency spikes.

Example: create a link

curl -X POST https://api.ul9.me/api/v1/links   -H "Authorization: Bearer ul9_xxx" -H "Content-Type: application/json"   -d '{"url":"https://example.com","alias":"spring","domain":"ul9.me"}'

Pagination and limits

List endpoints accept page and per (default 20). Each key is limited to 120 requests/minute; batch imports should be paced and handle 429.