---
title: "Update Rotator Rule"
method: POST
path: "/links/{link_id}/rotator/{rule_id}"
tags: ["Link Rules"]
---

# Update Rotator Rule

`POST /links/{link_id}/rotator/{rule_id}`

## Request

- Base URL: `https://api.rebrandly.com/v1`
- URL: `https://api.rebrandly.com/v1/links/{link_id}/rotator/{rule_id}`
- Auth: API key in header `apikey`

Update a single rotator rule.

**Blocked by:**
- Link deleted (status=3)
- Revoked workspace

## Path parameters

- `link_id` string, required
- `rule_id` string, required

## Headers

- `Workspace` string
- `apikey` string, required

## Request body

- RotatorRuleInput: Input for creating/updating a rotator rule
  - `destination` string, uri, required: Target destination URL
  - `weight` integer: Traffic weight percentage (0-100)
  - `rank` integer: Rule priority/rank

## Response `200`

Updated rotator rule

- RotatorRule: Rotator rule for A/B testing or traffic distribution
  - `id` string, required: Rule public ID
  - `rank` integer: Rule priority/rank
  - `destination` string, uri, required: Target destination URL
  - `weight` integer: Traffic weight percentage (0-100)
  - `createdAt` string, date-time
  - `updatedAt` string, date-time

## Other responses

- `403`: Forbidden - Insufficient permissions
- `404`: Resource not found

---

[API](https://skmtc.dev/rebrandly/apis/rebrandly-api.md) - [All operations](https://skmtc.dev/rebrandly/apis/rebrandly-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rebrandly/apis/rebrandly-api/revisions/b098bf9fb684?raw)
