Links
A link is a mapping: a slug on a domain, a fallback url, and an ordered list of routing rules that decide per visitor.
/v1/linksCreate a link
The one required field is url. Everything else — slug, domain, routing — has a working default, so the minimum viable create is one field.
urlstringREQUIREDFallback destination — where visitors go when no rule matches.
slugstringPath on the domain. Omitted → generated, readable, collision-checked.
domainstringDefaults to rii.link. Any verified host on the workspace.
routingarrayOrdered if/then rules — see PATCH below for the shape.
expires_attimestampAfter this moment the link answers 410 instead of routing.
/v1/linksList links
Cursor-paginated, newest first. Filter to one domain to audit a host before disconnecting it.
limitintegerDefault 25, max 100.
cursorstringnext_cursor from the previous page.
domainstringOnly links on this host.
/v1/links/{id}Retrieve a link
The full object, including the routing array in evaluation order.
/v1/links/{id}Update a link
PATCH semantics per field — but routing replaces the whole array on write. Send it in the order you want it evaluated; first match wins.
routingarrayThe full rule list. Conditions: country, device, language, time. First match wins.
urlstringNew fallback destination.
slugstringRenames the path — the old slug 301s for 30 days.
/v1/links/{id}Delete a link
Deletes the mapping and quarantines the slug for 30 days before it can be re-claimed — a reprinted poster should never route somewhere new silently.