URL Shortener API

Base URL: https://urlshort.at

Prefer a narrative walkthrough before diving into verbs? Read the URL shortener API guide for onboarding tips and operational guardrails engineering managers expect.

POST /api/shorten

Create a short URL. Requires a creatorId (UUID) so links can be listed and deleted later.

Content-Type: application/json

{
  "url": "https://example.com/long-path",
  "creatorId": "your-uuid-v4",
  "customCode": "my-brand",
  "expiresIn": 24
}

Examples

# cURL
curl -X POST https://urlshort.at/api/shorten \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com","creatorId":"550e8400-e29b-41d4-a716-446655440000"}'
// JavaScript (fetch)
const res = await fetch("https://urlshort.at/api/shorten", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    url: "https://example.com",
    creatorId: crypto.randomUUID(),
  }),
});
const data = await res.json();
# Python (requests)
import requests, uuid
r = requests.post("https://urlshort.at/api/shorten", json={
    "url": "https://example.com",
    "creatorId": str(uuid.uuid4()),
})
print(r.json())

expiresIn is optional hours until expiry. customCode is optional (3–32 chars, alphanumeric, _ -).

GET /api/urls

Query: creatorId, optional page, limit.

GET /api/stats/:code

Query: creatorId (must match link owner).

DELETE /api/urls/:code

Query: creatorId.

Public tools

  • GET /api/public/summary/:code — click count + destination (no auth)
  • GET /api/public/resolve?url= — expand a urlshort.at link
  • POST /api/public/bulk-shorten — body { urls: string[], creatorId } (max 50)

FAQ

Do you offer GraphQL or webhooks?
Today the product standardizes on JSON REST verbs; extend automations by polling list endpoints or pushing through your job queue.
Recommended authentication pattern?
Treat creatorId as a service account secret—rotate if repositories leak and never embed it in static frontends exposed to browsers.
Global latency expectations?
Cloudflare Workers terminate close to clients; still apply retry logic for upstream origin hiccups unrelated to URLShort.
SLA or paid tiers?
Documentation describes good-citizen quotas; monitor response headers for adaptive throttling cues during traffic spikes.

More free utilities on URLShort — all work alongside your shortened links.