To add rules to an existing custom ruleset, use the Update an account ruleset operation and pass the rules in an array. Each rule has an expression and an action.
The following request adds two rules to a custom ruleset. These will be the only two rules in the ruleset.
The response includes the rule ID of the new rules in the id field:
Update rules in a custom ruleset
To update one or more rules in a custom ruleset, use the Update an account ruleset operation. Include the ID of the rules you want to modify in the rules array and add the fields you wish to update. The request replaces the entire ruleset with a new version. Therefore, you must include the ID of all the rules you wish to keep.
The following request edits one rule in a custom ruleset and updates the execution order of the rules.
The response returns the modified custom ruleset. Note that the updated rule and ruleset version number increment.
The request above completely replaces the list of rules in the ruleset. If you omit an existing rule from the rules array, it will not appear in the new version of the ruleset.