Your first link, over the API
Four steps: get a key, create a link, attach a routing rule, read the clicks back. Every pane below runs against /v1 — pick cURL, Node.js (fetch) or Python (requests); there is no package to install.
Get an API key
Dashboard → Settings → API keysCreate a key yourself — shown once at creation. Live keys start with rii_live_, test keys with rii_test_ — test-key writes never touch production links.
Create the link
POST /v1/linksOne required field: url. Add slug to choose the path — omit it and a short random one is generated. The response is the full link object; id is what every later call takes.
Attach a routing rule
PATCH /v1/links/{id}routing is an ordered array of if/then rules — the whole array is replaced on write. First match wins; url stays the fallback. Routing rules need Premium; on Free the call answers 403 plan_upgrade_required.
Read the clicks back
GET /v1/links/{id}/statsAggregates with from/to bounds, grouped by country, device, referrer, or rule. Need push instead of pull? The SSE stream carries live clicks on API-created links today — webhook delivery is roadmap, dated on its own page.