---
title: "Update All Rotator Rules"
method: PUT
path: "/links/{link_id}/rotator"
tags: ["Link Rules"]
---

# Update All Rotator Rules

`PUT /links/{link_id}/rotator`

## Request

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

Replace all rotator rules for the link with a new set.

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

## Path parameters

- `link_id` string, required

## Headers

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

## Request body

- RotatorRuleInput[]: Complete list of rotator rules
  - `destination` string, uri, required: Target destination URL
  - `weight` integer: Traffic weight percentage (0-100)
  - `rank` integer: Rule priority/rank

## Response `200`

Updated rotator rules

- RotatorRule[]
  - `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

---

[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)
