Skip to content
Urlzee

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

  1. Create an account and open Dashboard → API keys.
  2. Create a key. It is shown once, so store it somewhere safe.
  3. 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

MethodPathDescription
POST/linksCreate a short link
GET/linksList your links (paginated)
GET/links/{id}Get one link
PATCH/links/{id}Update a link
DELETE/links/{id}Delete a link
GET/links/{id}/statsClick statistics

Create a link

POST /links

FieldTypeNotes
urlstring, requiredDestination. Must be http or https, at most 2,048 characters.
aliasstringCustom ending, 3–50 characters: letters, numbers, - and _.
titlestringLabel shown in your dashboard, up to 200 characters.
expires_atISO 8601 dateWhen 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

PlanRequests per monthRequests per minuteLinks per month
Free1001050
Pro10,000605,000
Business100,00030050,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." } }
StatusCodeMeaning
400bad_requestThe body is missing or not valid JSON.
401unauthorizedMissing, malformed or revoked API key.
403plan_requiredThe feature needs a higher plan.
404not_foundThe link doesn't exist or isn't yours.
409alias_takenThe custom alias is in use.
422url_*, alias_invalidThe URL or alias failed validation, or the destination is blocked as unsafe.
429rate_limitedToo 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.