Sync a link's routing rules
Syncs the link's routing rules to the given set: a rule whose id matches an existing one is updated in place (keeping that id and its analytics history), a rule with no id (or an id that doesn't belong to this link) is created, and any existing rule left out of the set is deleted. For editing or removing a single rule without resending the whole list, prefer PATCH/DELETE on /v1/links/{id}/rules/{ruleId} instead. An actual change to the rule set is audited as link.rules_updated (counts of rules added, removed and changed — never their destinations); re-sending an unchanged set is not an event, and neither are the single-rule endpoints below when nothing changes. On redirect, inactive rules (active: false) are skipped entirely regardless of kind; among the rest, geo rules (2-letter country) match first, then device rules (mobile/tablet/desktop), then schedule rules (active start/end window), 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
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", "startAt": "2019-08-24T14:15:22Z", "endAt": "2019-08-24T14:15:22Z", "active": true } ]}EAS-81: reset the QR logo back to Easerix's built-in default
The customize panel's "Reset to default" action for the logo. Clears any custom upload (deleting the stored object) AND clears qrLogoRemoved — unlike DELETE .../qr/logo, which always leaves the code with no logo at all, this returns it to the untouched state where GET .../qr applies the built-in default logo again. Idempotent: resetting a link that's already on the default returns 204. Owner-only, same as PUT .../qr/style.
Update one routing rule
Updates one routing rule in place. Unlike PATCH /v1/links/{id}/rules (a whole-set sync), this never touches any other rule — except that the split-weight-sum invariant spans the whole rule set, so an update that changes a split rule's weight (or changes a rule's kind to/from split) is still checked against every other split rule on the link before being applied.