Skip to main content
POST
Move a rule
Moves an ACTIVE or SUSPENDED rule within its current set or into another set. Supply the destination rule_set_id, a position, and the current expected_rule_configuration_version. Scrip renumbers the rules in both sets together, starting at 1 with no gaps. Archived rules cannot move.
See Move or reorder for changing rule and rule-set order.

Authorizations

Authorization
string
header
default:sk_...
required

Send your API key as Authorization: Bearer <key>.

Headers

Idempotency-Key
string

Unique key (1-255 printable ASCII characters) to make retries safe. Repeating the same request with the same key within 24 hours replays the original response (Idempotent-Replayed: true).

Maximum string length: 255

Path Parameters

rule_id
string<uuid>
required

The rule's id.

Body

application/json

The destination rule set and where to place the rule

Moves a rule to a position in a rule set, which may be a different set.

expected_rule_configuration_version
integer
required

Current rule_configuration_version from the configuration read endpoint. A stale value rejects the request.

Required range: x >= 1
Example:

3

position
object
required

Semantic destination within the destination rule set.

rule_set_id
string<uuid>
required

Destination rule-set ID. It may be the rule's current set.

Example:

"d4735e3a-265e-4f16-b1a5-4c8e9d6f0a04"

Response

The moved rule, both rule sets in their new order, and the new rule_configuration_version

The moved rule and the renumbered rules in the source and destination rule sets.

destination_rules
object[]

Complete renumbered sequence in the destination set.

rule
object

Moved rule in its final position.

rule_configuration_version
integer

Resulting program rule-configuration version.

Example:

4

source_rule_set_id
string<uuid>

Rule set that contained the rule before the move.

source_rules
object[]

Complete renumbered sequence left in the source set.