REST API Documentation
Integrate short link creation, custom domain routing, and click metrics into your applications.
1. Authentication
All API requests must include your secret API key in the standard Authorization: Bearer header or via the x-api-key header.
Authorization: Bearer ul0_live_••••••••••••••••••••••••
Manage your credentials in the API Keys dashboard →
2. Create a Short Link
bash
curl -X POST https://ul0.site/api/shorten \
-H "Authorization: Bearer ul0_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"longUrl": "https://example.com/very-long-product-details-link",
"customSlug": "summer-sale",
"host": "link.yourbrand.com"
}'Expected JSON Response (200 OK)
{
"slug": "summer-sale",
"shortUrl": "https://link.yourbrand.com/r/summer-sale",
"host": "link.yourbrand.com",
"id": "670c1d2e0021b8f9a"
}3. Core API Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /api/shorten | Create short link or dynamic QR code |
| GET | /api/keys | List active credentials and usage |
| POST | /api/keys | Generate a new secret API key |
| DELETE | /api/keys?id=:keyId | Revoke a specific API key |
| GET | /api/dashboard/links/:id/analytics | Query aggregated click metrics |
| DELETE | /api/links/:id | Permanently delete a short link |
Rate Limits by Plan
- Free Plan10 requests / min (Sandbox)
- Pro Plan60 requests / min
- Business Plan300 requests / min
HTTP Error Codes
- 400 Bad Request: Invalid URL or duplicate slug
- 401 Unauthorized: Missing or expired Bearer key
- 403 Forbidden: Domain not verified or plan gated
- 429 Too Many Requests: Exceeded rate limit window
- 500 Server Error: Database or network glitch
OpenAPI 3.1 Specification
Download the machine-readable OpenAPI schema for Postman, Insomnia, or SDK generation.
