Save an approved folder rule (beta)
add_ruleSaves an approved previewed folder rule to the saved rules store; later rule runs move matching mail. Requires the single-use token from the approved preview.
Instructions
Beta: Save the previewed folder rule; only call after explicit approval of its preview.
The rules engine is not fully reliable yet; preview first and check the results.
Use it only with a token from preview_add_rule that the user approved: the token, not an argument, holds the rule. Unless the operator turned it off, the user then confirms the exact rule in the client's form; a declined form retires the token.
Appends one rule to the saved rules store; never replaces, edits, reorders or removes a rule, and moves no mail now: later rule runs (preview_rules then apply_rules, or the optional timer) move the mail it matches. For Proton's own filtering on arrival use preview_sieve_filter. Removing a saved rule is a manual edit of the store; undo_action does not apply.
Returns log_id for the logged rule-saving attempt, with name, folder, rule_sha256, backend, added, attempted, partial and token_consumed. An expired, used or unknown token refuses, and so does a full store: preview again.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | Single-use token from the preview the user approved. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||