{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Computes the Email Routing rule changes that would be needed to reconcile a Wrangler-managed desired ruleset. This endpoint is read-only and does not create, update, or delete rules.","properties":{"path":{"type":"object","properties":{"account_id":{"$ref":"#/definitions/email_identifier"}},"required":["account_id"],"additionalProperties":false},"body":{"$ref":"#/definitions/email_account_rules_plan_request"}},"required":["path","body"],"additionalProperties":false,"definitions":{"email_identifier":{"description":"Identifier.","type":"string","maxLength":32,"examples":["023e105f4ecef8ad9ca31a8372d0c353"]},"email_account_rules_plan_request":{"type":"object","properties":{"catch_all_rules":{"description":"Desired catch-all Email Routing rules managed by the deploying Worker.","type":"array","items":{"$ref":"#/definitions/email_account_rules_plan_catch_all_entry"}},"owner_worker_tag":{"$ref":"#/definitions/email_rule_owner_worker_tag"},"rules":{"description":"Desired normal Email Routing rules managed by the deploying Worker.","type":"array","items":{"$ref":"#/definitions/email_account_rules_plan_rule"}}},"required":["owner_worker_tag"],"examples":[{"catch_all_rules":[{"rule":{"actions":[{"type":"worker","value":["my-worker"]}],"matchers":[{"type":"all"}]},"target":"*@example.com"}],"owner_worker_tag":"a7e6fb77503c41d8a7f3113c6918f10c","rules":[{"actions":[{"type":"worker","value":["my-worker"]}],"matchers":[{"field":"to","type":"literal","value":"support@example.com"}]},{"actions":[{"type":"worker","value":["my-worker"]}],"matchers":[{"field":"to","type":"literal","value":"info@example.com"}]},{"actions":[{"type":"worker","value":["my-worker"]}],"matchers":[{"field":"to","type":"literal","value":"billing@example.com"}]}]}]},"email_account_rules_plan_catch_all_entry":{"type":"object","properties":{"rule":{"$ref":"#/definitions/email_account_rules_plan_catch_all_rule"},"target":{"description":"Catch-all target to plan for, using the `*@domain` shape.","type":"string","examples":["*@example.com"]}},"required":["target","rule"]},"email_rule_owner_worker_tag":{"description":"Public tag (script_tag) of the Worker that owns this rule. Required when\n`source` is `wrangler`.\n","type":"string","maxLength":32,"examples":["a7e6fb77503c41d8a7f3113c6918f10c"]},"email_account_rules_plan_rule":{"type":"object","properties":{"actions":{"$ref":"#/definitions/email_rule_actions"},"enabled":{"$ref":"#/definitions/email_rule_enabled"},"matchers":{"$ref":"#/definitions/email_rule_matchers"}},"required":["actions","matchers"]},"email_account_rules_plan_catch_all_rule":{"type":"object","properties":{"actions":{"$ref":"#/definitions/email_rule_catchall-actions"},"enabled":{"$ref":"#/definitions/email_rule_enabled"},"matchers":{"$ref":"#/definitions/email_rule_catchall-matchers"}},"required":["actions","matchers"]},"email_rule_actions":{"description":"List actions patterns.","type":"array","items":{"$ref":"#/definitions/email_rule_action"},"maxItems":1,"minItems":1},"email_rule_enabled":{"description":"Routing rule status.","type":"boolean","default":true,"enum":[true,false],"examples":[true]},"email_rule_matchers":{"description":"Matching patterns to forward to your actions.","type":"array","items":{"$ref":"#/definitions/email_rule_matcher"}},"email_rule_catchall-actions":{"description":"List actions for the catch-all routing rule.","type":"array","items":{"$ref":"#/definitions/email_rule_catchall-action"},"maxItems":1,"minItems":1},"email_rule_catchall-matchers":{"description":"List of matchers for the catch-all routing rule.","type":"array","items":{"$ref":"#/definitions/email_rule_catchall-matcher"}},"email_rule_action":{"description":"Actions pattern.","type":"object","properties":{"type":{"description":"Type of supported action.","type":"string","enum":["drop","forward","worker"],"examples":["forward"]},"value":{"description":"List of values for the action. Currently limited to a single value.","type":"array","items":{"description":"Value for action.","maxLength":90,"type":"string","examples":["destinationaddress@example.net"]},"maxItems":1}},"required":["type"]},"email_rule_matcher":{"description":"Matching pattern to forward your actions.","type":"object","properties":{"field":{"description":"Field for type matcher.","type":"string","enum":["to"],"examples":["to"]},"type":{"description":"Type of matcher.","type":"string","enum":["all","literal"],"examples":["literal"]},"value":{"description":"Value for matcher.","type":"string","maxLength":90,"examples":["test@example.com"]}},"required":["type"]},"email_rule_catchall-action":{"description":"Action for the catch-all routing rule.","type":"object","properties":{"type":{"description":"Type of action for catch-all rule.","type":"string","enum":["drop","forward","worker"],"examples":["forward"]},"value":{"description":"List of values for the action. Currently limited to a single value.","type":"array","items":{"description":"Input value for action.","maxLength":90,"type":"string","examples":["destinationaddress@example.net"]},"maxItems":1}},"required":["type"]},"email_rule_catchall-matcher":{"description":"Matcher for catch-all routing rule.","type":"object","properties":{"type":{"description":"Type of matcher. Default is 'all'.","type":"string","enum":["all"],"examples":["all"]}},"required":["type"]}}},"name":"Plan account routing rule changes","id":"cloudflare.email-routing-routing-rules-plan-account-routing-rules","example":{"path":{"account_id":"023e105f4ecef8ad9ca31a8372d0c353"},"body":{"catch_all_rules":[{"rule":{"actions":[{"type":"worker","value":["my-worker"]}],"matchers":[{"type":"all"}]},"target":"*@example.com"}],"owner_worker_tag":"a7e6fb77503c41d8a7f3113c6918f10c","rules":[{"actions":[{"type":"worker","value":["my-worker"]}],"matchers":[{"field":"to","type":"literal","value":"support@example.com"}]},{"actions":[{"type":"worker","value":["my-worker"]}],"matchers":[{"field":"to","type":"literal","value":"info@example.com"}]},{"actions":[{"type":"worker","value":["my-worker"]}],"matchers":[{"field":"to","type":"literal","value":"billing@example.com"}]}]}},"maxRequests":1,"summary":false}}