EaserixDocs
DevelopersAPI referenceLinksLinks

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 Markdown
POST
/v1/links/{id}/rules
AuthorizationBearer <token>

In: header

Path Parameters

id*string

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"    }  ]}