Your first link, over the API
Four requests: mint a key, create a link, attach a routing rule, read the clicks back. Every pane below runs against /v1 — pick cURL, Node.js, or Python; the shapes are the same ones the dashboard itself uses.
Mint an API key
Dashboard → Settings → API keysKeys are minted in the dashboard and shown once. 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 readable 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.
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 is live today — webhook delivery is roadmap, dated on its own page.