---
title: "Update a routing rule"
method: PATCH
path: "/v2/routing-rules/{routing_rule_id}"
tags: ["Routing Rules"]
---

# Update a routing rule

`PATCH /v2/routing-rules/{routing_rule_id}`

Partially updates routing-rule metadata or configuration. Project scope is immutable.

## Path parameters

- `routing_rule_id` string, required

## Request body

- UpdateRoutingRuleRequest
  - `display_name` string
  - `description` string
  - `enabled` boolean
  - `expression` RoutingRuleExpression
    - `config` object
    - `cel` string — CEL expression used to match requests. Empty means the rule always matches.
  - `models_config` RoutingRuleModelsConfig
    - `mode` string — Load-balancing mode.
    - `models` RoutingRuleModel[]
      - `model` string
      - `display_name` string
      - `weight` number, double
      - `integration_id` string
  - `plugins` RoutingRulePlugin[]
    - `id` string — Plugin discriminator.
    - `language` string — Languages, regions and entity types are checked against the live pii-detection capabilities catalog when the rule is saved, not pinned here, so a language or region the detector gains becomes writable without a proto change.
    - `entities` string[] — Entity types to redact. Mutually exclusive with regions.
    - `on_failure` string
    - `threshold` number, double
    - `mask` string[]
    - `regions` string[] — Regions of coverage by ISO 3166-1 alpha-2 code, or ["all"]. Mutually exclusive with entities.
    - `entity_thresholds` object — Per-entity-type confidence cutoff. Every key must also appear in entities.
  - `priority` integer
  - `cache_config` RoutingRuleCacheConfig
    - `ttl` integer, required — Cache time to live in seconds. Maximum 259200 seconds (3 days).

## Response `200`

OK

- RoutingRule
  - `_id` string, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `created_by_id` string, required
  - `updated_by_id` string, required
  - `project_id` string, required — Project that contains the rule. Empty for workspace-wide rules.
  - `display_name` string, required — Human-readable routing-rule name.
  - `description` string, required
  - `enabled` boolean, required
  - `expression` RoutingRuleExpression
    - `config` object
    - `cel` string — CEL expression used to match requests. Empty means the rule always matches.
  - `models_config` RoutingRuleModelsConfig
    - `mode` string — Load-balancing mode.
    - `models` RoutingRuleModel[]
      - `model` string
      - `display_name` string
      - `weight` number, double
      - `integration_id` string
  - `plugins` RoutingRulePlugin[], required
    - `id` string — Plugin discriminator.
    - `language` string — Languages, regions and entity types are checked against the live pii-detection capabilities catalog when the rule is saved, not pinned here, so a language or region the detector gains becomes writable without a proto change.
    - `entities` string[] — Entity types to redact. Mutually exclusive with regions.
    - `on_failure` string
    - `threshold` number, double
    - `mask` string[]
    - `regions` string[] — Regions of coverage by ISO 3166-1 alpha-2 code, or ["all"]. Mutually exclusive with entities.
    - `entity_thresholds` object — Per-entity-type confidence cutoff. Every key must also appear in entities.
  - `priority` integer, required — Evaluation order. Lower values are evaluated first.
  - `cache_config` RoutingRuleCacheConfig
    - `ttl` integer, required — Cache time to live in seconds. Maximum 259200 seconds (3 days).

## Changes

> 271 revisions in range; 82 not diffed.

- **2026-08-24** `addad33219df` — 17 breaking, 19 info
  - the request property `models_config/models` became not nullable
  - removed the enum value `fallback` of the request property `models_config/mode`
  - removed the enum value `latency_based` of the request property `models_config/mode`
  - removed the enum value `round_robin` of the request property `models_config/mode`
  - …32 more
- **2026-08-21** `1586760a252f` — 12 breaking, 14 warning, 13 info
  - request property `models_config/mode` was restricted to a list of enum values
  - the request property `expression/cel` became required
  - the request property `models_config/mode` became required
  - the request property `models_config/models` became required
  - …35 more
- **2026-08-21** `4fdc24e562eb` — 17 breaking, 19 info
  - the request property `models_config/models` became not nullable
  - removed the enum value `fallback` of the request property `models_config/mode`
  - removed the enum value `latency_based` of the request property `models_config/mode`
  - removed the enum value `round_robin` of the request property `models_config/mode`
  - …32 more
- …earlier changes not shown

[Full history](https://skmtc.dev/orq-ai/apis/orq-ai-api/changes/v2/routing-rules/:routing_rule_id/patch.md)

---

[API](https://skmtc.dev/orq-ai/apis/orq-ai-api.md) · [All operations](https://skmtc.dev/orq-ai/apis/orq-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/orq-ai/orq-ai-api/revisions/3df7b466d7e5/schema)
