Update a rule
Partially update a rule. At least one field must be provided, and actions when included must be non-empty. Supplying rule_set_id moves the rule atomically and renumbers both affected sets. Successful configuration changes return the resulting rule_configuration_version; no-op writes retain the current version.
name, description, condition, actions, rule_set_id, stop_after_match, active_from, active_to, budgets, or status. Only the fields included in the request body are changed; omitted fields remain untouched.
The budgets field is a full replacement when present. The provided array replaces all existing budgets. Omitting the field leaves budgets unchanged. To remove all budgets, send an empty budgets array.
To suspend a rule without archiving it, set status to SUSPENDED. To archive a rule, set status to ARCHIVED. Suspended rules retain their position. Archived rules leave the sequence.
stop_after_match remains local to the rule’s containing set. Moving a stopping rule changes which later rules it can skip.
Supplying rule_set_id moves the rule to that set and renumbers both affected sets. To also control where it lands, use the move rule endpoint, which takes a position and an expected_rule_configuration_version for conflict-safe placement.
Archived rules cannot be modified. Rules belonging to an archived program also cannot be modified. Successful configuration changes include the resulting rule_configuration_version; no-op writes retain the current version.
Authorizations
API key passed in the X-API-Key header.
Path Parameters
Rule ID
Body
Fields to update
Request body for updating an existing rule. Only provided fields are updated; at least one field must be specified.
Replacement actions array. Omit to leave actions unchanged. If provided, must be non-empty.
Credit an asset to the target. Requires asset_id and a positive amount. reference_id, expires_at, and matures_at apply to LOT-mode assets only.
- CREDIT action
- DEBIT action
- HOLD action
- RELEASE action
- RELEASE action
- FORFEIT action
- VOID_HOLD action
- TAG action
- UNTAG action
- COUNTER action
- SET_ATTRIBUTE action
- SET_TIER action
- SCHEDULE_EVENT action
- BROADCAST action
Start of the rule's active window (RFC 3339). Send null to clear.
"2024-01-01T00:00:00Z"
End of the rule's active window (RFC 3339). Send null to clear.
"2024-12-31T23:59:59Z"
Replacement budget array. Omit to leave budgets unchanged. Send empty array to remove all budgets.
Never resets. schedule_type, cron_expression, and interval are all rejected.
- Lifetime budget
- Cron budget
- Interval budget
Updated CEL expression
1"event.type == 'purchase'"
Updated description
1000"Updated description"
Updated display name
1 - 255"Updated Rule Name"
Move this rule to another rule set. Omit to keep the current assignment.
"550e8400-e29b-41d4-a716-446655440001"
Updated lifecycle status: ACTIVE, SUSPENDED, or ARCHIVED
ACTIVE, SUSPENDED, ARCHIVED "SUSPENDED"
Whether to stop evaluating subsequent rules in this set after this one matches; other sets continue
true
Response
Updated rule
Actions to execute when the condition matches
Start of the rule's active window (RFC 3339, null if always active). Checked against the event's event_timestamp, inclusive.
"2024-01-01T00:00:00Z"
End of the rule's active window (RFC 3339, null if no end date). Checked against the event's event_timestamp, exclusive.
"2024-12-31T23:59:59Z"
Budget constraints applied to this rule
CEL expression that determines when the rule fires
"event.type == 'purchase' && event.amount > 0"
When this rule was created (RFC 3339)
"2024-01-15T10:30:00Z"
When this rule was archived (null if not archived)
"2024-06-01T00:00:00Z"
Human-readable summary of what this rule does
"Awards 10 points per dollar spent"
Unique identifier for this rule
"550e8400-e29b-41d4-a716-446655440000"
Display name
"Purchase Reward"
Evaluation position within the containing rule set (lower = first; ACTIVE and SUSPENDED rules occupy unique positions)
1
Program this rule belongs to
"550e8400-e29b-41d4-a716-446655440001"
Resulting program rule-configuration revision. Present on mutation responses.
4
Rule set that contains this rule and scopes its order and stop_after_match behavior
"550e8400-e29b-41d4-a716-446655440002"
Lifecycle status: ACTIVE, SUSPENDED, or ARCHIVED
"ACTIVE"
When true, no subsequent rules in this set evaluate after this one matches; other sets continue
false
When this rule was last modified (RFC 3339)
"2024-01-15T10:30:00Z"
Non-blocking advisories about the rule's condition or action expressions, such as unknown state-key typos or deprecated CEL aliases. Present on create/update only; never blocks the save.