Developers

API & integrations

A small, predictable REST API. JSON in, JSON out.

Authentication

Create a key under API & apps and send it with every request:

Authorization: Bearer snip_your_key_here

The base URL is https://servtest12.relay.do/api/v1. Apps can also sign in with an email and password:

POST/api/v1/auth/login
curl -X POST https://servtest12.relay.do/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","password":"…","code":"123456","device":"My Mac"}'

→ {"key":"snip_…","user":{"plan":{…},"features":{"qr":true,…},"domains":[…]}}

code is only needed when two-factor sign-in is on (the API answers totp_required). GET /api/v1/me returns the same user object — plan, unlocked features, limits and domains.

Quick shorten

GET/api/v1/shorten?url=…&format=text
curl "https://servtest12.relay.do/api/v1/shorten?url=https://example.com&format=text" \
  -H "Authorization: Bearer $SNIP_KEY"
→ https://servtest12.relay.do/a8Kx2p
POST/api/v1/links
{
  "url": "https://example.com/spring-sale",
  "slug": "spring",                    // optional back-half
  "domain": "go.yourbrand.com",        // optional — id or host
  "title": "Spring sale", "tags": ["campaign", "instagram"],
  "utm": {"source": "instagram", "medium": "social", "campaign": "spring"},
  "og_title": "…", "og_description": "…", "og_image": "https://…",
  "ios_url": "https://apps.apple.com/…", "android_url": "https://play.google.com/…",
  "geo": [{"country": "DE", "url": "https://example.de"}],
  "password": "…", "expires_at": "2026-12-31T23:59:00Z", "max_clicks": 1000, "expired_url": "https://…"
}

Returns the link (201) with id, short_url, clicks, qr_svg and every field above.

GET/api/v1/links?q=&tag=&sort=new|clicks|active|old&page=1&per_page=50&archived=0
GET/api/v1/links/{id}
PATCH/api/v1/links/{id}

Send only the fields you want to change — including archived and disabled.

DELETE/api/v1/links/{id}
GET/api/v1/tags
GET/api/v1/meta?url=…

Fetches a page's title, description and preview image.

Analytics

GET/api/v1/links/{id}/stats?days=30
GET/api/v1/stats?days=30
{"total": 1204, "unique": 911, "previous": 830, "qr": 140,
 "series": [{"day":"2026-10-01","clicks":40,"unique":31}, …],
 "countries": [{"key":"US","label":"United States","clicks":602}, …],
 "cities": […], "devices": […], "os": […], "browsers": […], "referrers": […], "sources": […]}

QR codes

GET/api/v1/links/{id}/qr.svg?fg=11141B&bg=FFFFFF
GET/api/v1/links/{id}/qr.png?s=16

Scans are counted separately from clicks.

Domains

GET/api/v1/domains
POST/api/v1/domains {"host":"go.yourbrand.com"}
POST/api/v1/domains/{id}/verify
DELETE/api/v1/domains/{id}

Errors & limits

{"error": {"code": "upgrade_required", "message": "Branded domains is available on Pro…"}}

Codes: unauthorized (401), upgrade_required (402), forbidden (403), not_found (404), conflict (409 — back-half taken), invalid (422), rate_limited (429). Each key may make 120 requests per minute.

Zapier & Make

Use the Webhooks by Zapier action (or Make's HTTP module): POST https://servtest12.relay.do/api/v1/links with the header Authorization: Bearer snip_… and a JSON body containing url. Map short_url from the response into the next step.

Shortcuts, Raycast, Alfred

Any tool that can open a URL works with the quick endpoint. In Apple Shortcuts: Get Contents of URL → https://servtest12.relay.do/api/v1/shorten?format=text&url= + the input, with an Authorization header, then Copy to Clipboard.