---
title: "Edit an always-on rule"
method: PATCH
path: "/api/v1/campaigns/{campaign_id}/routing-rules/{rule_id}"
tags: ["experiments"]
---

# Edit an always-on rule

`PATCH /api/v1/campaigns/{campaign_id}/routing-rules/{rule_id}`

## Request

- Base URL: `https://api.outrival.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.outrival.com/api/v1/campaigns/{campaign_id}/routing-rules/{rule_id}`
- Auth: HTTP bearer

Edit a rule in place.

## Path parameters

- `campaign_id` string, required
- `rule_id` string, required

## Request body

- UpdateRoutingRuleRequest: An edit to a live rule. Every field is optional; omitted means unchanged. ``active`` is absent on purpose — stopping a rule is its own endpoint, not a boolean hidden in a general PATCH.
  - `name` string, nullable
  - `targeting_rules` TargetingCondition[], nullable
    - `field` string, required: Contact field to compare
    - `operator` string, required: One of the nine operators the engine matches on
    - `value` string, required: What the field is compared against
  - `pin_overrides` object, nullable
  - `priority` integer, nullable

## Response `200`

Successful Response

- object

## Other responses

- `400`: Invalid campaign or rule ID format
- `403`: User may not edit this campaign
- `404`: No such rule on this campaign
- `409`: The edit would pin a section another live rule already holds. The detail names the holder.
- `422`: The edit could not be stored

## Changes

- **2026-09-03** `219a10b80707`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/outrival/apis/fastapi/changes/api/v1/campaigns/:campaign_id/routing-rules/:rule_id/patch.md)

---

[API](https://skmtc.dev/outrival/apis/fastapi.md) - [All operations](https://skmtc.dev/outrival/apis/fastapi/llms.txt) - [OpenAPI document](https://skmtc.dev/outrival/apis/fastapi/revisions/f27d90300b5e?raw)
