Skip to main content
POST
Move a rule set
Moves one rule set to first, last, before, or after another set. Relative placement requires the sibling’s stable ID in reference_id. Send the current expected_rule_configuration_version; a stale version returns 409 rule_configuration_version_conflict. Scrip returns the complete renumbered set order and resulting version.
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

program_id
string<uuid>
required

The program's id.

rule_set_id
string<uuid>
required

The rule set's id.

Body

application/json

Where to move the rule set

Moves a rule set to a new position in the program.

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 for the rule set.

Response

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

The rule sets in a program after reordering, numbered in order, and the new rule configuration version.

rule_configuration_version
integer

Resulting program rule-configuration version.

Example:

4

rule_sets
object[]

Complete rule-set sequence after renumbering.