REST API v1

URL shortener API

Create short links and read click stats from your app, CRM, SMS tool or no-code workflow. Simple JSON over HTTPS.

Get your free API key

Authentication

Create an API key in Dashboard → API. Send it as a Bearer token with every request:

Authorization: Bearer YOUR_API_KEY
Accept: application/json

Base URL: https://saerly.com/api/v1

Rate limits

PlanAPI calls per day
Free200
Starter2,000
Pro20,000
Business100,000

Plus a burst limit of 120 requests per minute. Exceeding a limit returns 429 Too Many Requests. Links created by API count toward your monthly link limit.

Create a short link

POST /links

curl -X POST https://saerly.com/api/v1/links \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/products/blue-shoes?size=9", "alias": "blue-shoes", "title": "Blue shoes", "tags": ["shop", "diwali"]}'

Optional fields: alias, title, tags (array or comma list), expires_at (ISO date), click_limit, password, utm (object with utm_source, utm_medium, utm_campaign, utm_term, utm_content), domain_id.

Response 201:

{
  "data": {
    "id": 7301,
    "code": "blue-shoes",
    "short_url": "https://saerly.com/blue-shoes",
    "long_url": "https://example.com/products/blue-shoes?size=9",
    "title": "Blue shoes",
    "tags": ["shop", "diwali"],
    "clicks": 0,
    "active": true,
    "qr_png": "https://saerly.com/qr/blue-shoes.png",
    "qr_svg": "https://saerly.com/qr/blue-shoes.svg",
    "created_at": "2026-11-07T10:30:00+00:00"
  }
}

List your links

GET /links?search=shoes&per_page=25&page=1

Get, update or delete a link

GET    /links/{code}
PATCH  /links/{code}   {"title": "New title", "active": false, "url": "https://new-destination.com"}
DELETE /links/{code}

Changing url requires a plan with destination editing (Starter and above).

Click statistics

GET /links/{code}/stats?range=30d — range is 24h, 7d, 30d, 90d, 1y or all (limited to your plan's history).

{
  "data": {
    "code": "blue-shoes",
    "totals": {"clicks": 1280, "uniques": 954, "scans": 210},
    "series": [{"date": "2026-11-01", "clicks": 40}, ...],
    "countries": [{"label": "India", "clicks": 1100}, ...],
    "cities": [...], "devices": [...], "browsers": [...], "os": [...], "referrers": [...], "sources": [...]
  }
}

Your account

GET /me returns your plan and usage.

QR code images

Every link has a QR image at https://saerly.com/qr/{code}.png or .svg. Options: size (120–2000), fg and bg (hex colors without #), download=1.

Errors

StatusMeaning
401Missing or wrong API key
403Account inactive
404Link not found (or not yours)
422Validation failed — see message and errors
429Rate limit reached

Questions or need higher limits? Contact us.