Urlzee API documentation
Last updated:
The Urlzee API creates and manages short links over HTTPS. Requests and responses are JSON. Every account, including free ones, can create an API key.
Quick start
- Create an account and open Dashboard → API keys.
- Create a key. It is shown once, so store it somewhere safe.
- Send it as a Bearer token with every request.
curl -X POST https://urlzee.com/api/v1/links \
-H "Authorization: Bearer uz_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/a/very/long/page"}'{
"data": {
"id": "0b9f6c1e-5f0e-4a4b-9f38-2f1d1c0a7e11",
"slug": "k3Xp9Qa",
"short_url": "https://urlzee.com/k3Xp9Qa",
"destination": "https://example.com/a/very/long/page",
"title": null,
"clicks": 0,
"is_active": true,
"expires_at": null,
"created_at": "2026-11-30T09:15:00.000Z"
}
}Authentication
Base URL: https://urlzee.com/api/v1. Authenticate with the header Authorization: Bearer uz_live_…. Keys belong to your account; anyone holding a key can create and delete your links, so keep keys on your server and never ship them in browser or mobile app code. Revoke a leaked key from the dashboard.
Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /links | Create a short link |
| GET | /links | List your links (paginated) |
| GET | /links/{id} | Get one link |
| PATCH | /links/{id} | Update a link |
| DELETE | /links/{id} | Delete a link |
| GET | /links/{id}/stats | Click statistics |
Create a link
POST /links
| Field | Type | Notes |
|---|---|---|
url | string, required | Destination. Must be http or https, at most 2,048 characters. |
alias | string | Custom ending, 3–50 characters: letters, numbers, - and _. |
title | string | Label shown in your dashboard, up to 200 characters. |
expires_at | ISO 8601 date | When the link stops working. Pro and Business. |
List links
GET /links?page=1&limit=25. limit can be 1–100. The response contains data, page, limit and total.
Update a link
PATCH /links/{id} accepts any of title, is_active, url and expires_at. Changing url or expires_at requires Pro or Business. Send {"is_active": false} to pause a link.
Click statistics
GET /links/{id}/stats?days=30 returns total clicks for the period, clicks per day, and the top countries, referrers, devices, browsers and operating systems. Bot traffic is reported separately in bots. The maximum period depends on your plan.
Rate limits and quotas
| Plan | Requests per month | Requests per minute | Links per month |
|---|---|---|---|
| Free | 100 | 10 | 50 |
| Pro | 10,000 | 60 | 5,000 |
| Business | 100,000 | 300 | 50,000 |
Responses include X-RateLimit-Limit, X-RateLimit-Remaining, X-Quota-Limit and X-Quota-Remaining. When a limit is exceeded the API returns 429 with a Retry-After header in seconds. See pricing for plan details.
Errors
Errors use standard HTTP status codes and a JSON body:
{ "error": { "code": "alias_taken", "message": "That alias is already taken. Try another." } }| Status | Code | Meaning |
|---|---|---|
| 400 | bad_request | The body is missing or not valid JSON. |
| 401 | unauthorized | Missing, malformed or revoked API key. |
| 403 | plan_required | The feature needs a higher plan. |
| 404 | not_found | The link doesn't exist or isn't yours. |
| 409 | alias_taken | The custom alias is in use. |
| 422 | url_*, alias_invalid | The URL or alias failed validation, or the destination is blocked as unsafe. |
| 429 | rate_limited | Too many requests, or the monthly quota is used up. |
Examples
JavaScript (Node.js 18+)
const res = await fetch("https://urlzee.com/api/v1/links", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.URLZEE_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ url: "https://example.com/launch", alias: "launch" }),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(error.message);
console.log(data.short_url);Python
import os, requests
res = requests.post(
"https://urlzee.com/api/v1/links",
headers={"Authorization": f"Bearer {os.environ['URLZEE_API_KEY']}"},
json={"url": "https://example.com/launch"},
timeout=10,
)
res.raise_for_status()
print(res.json()["data"]["short_url"])Acceptable use
Links created through the API go through the same safety checks as the website and must follow the acceptable use policy. Accounts that create links to phishing, malware or spam are suspended.