Replace a link's routing rules
Replaces the link's routing rules. On redirect, geo rules (2-letter country) match first, then device rules (mobile/tablet/desktop), then split rules pick a destination by weight — the unallocated remainder stays on the main destination. Clicks record the winning rule's label as their variant.
View as MarkdownAuthorization
bearer In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/links/string/rules" \ -H "Content-Type: application/json" \ -d '{ "rules": [ { "kind": "geo", "destinationUrl": "string" } ] }'{ "rules": [ { "id": "string", "kind": "geo", "match": "string", "destinationUrl": "string", "weight": 0, "label": "string" } ]}QR code for a short link (PNG)
PNG QR code encoding the link's short URL. size is clamped to 128–1024 (default 512); fg/bg are 6-digit hex colors; download=1 switches the Content-Disposition to attachment.
Public short-link redirect
The product itself: 302 to the destination URL (recording the click) when the link exists, is active, and is unexpired — otherwise 302 to the web app's /unavailable page with a reason (notfound, paused, expired). Unauthenticated; served on esrx.ly. Resolves by short code alone — org, owner, and visibility never narrow it, so a private link still redirects for anyone holding the code.