Update routing rule

Update actions and matches, or enable/disable specific routing rules.

/zones/{zone_identifier}/email/routing/rules/{rule_identifier}

put

Email Routing routing rules

email-routing-routing-rules-update-routing-rule

Debug "planAvailability"

{
  "business": true,
  "enterprise": true,
  "free": true,
  "pro": true
}

Debug "tokenPermissions"

{
  "enum": [
    "com.cloudflare.api.account.zone.email.routing.rule.update"
  ]
}

Debug "parameters"

[
  {
    "in": "path",
    "name": "rule_identifier",
    "required": true,
    "schema": {
      "description": "Routing rule identifier.",
      "example": "a7e6fb77503c41d8a7f3113c6918f10c",
      "maxLength": 32,
      "readOnly": true,
      "type": "string"
    }
  },
  {
    "in": "path",
    "name": "zone_identifier",
    "required": true,
    "schema": {
      "description": "Identifier",
      "example": "023e105f4ecef8ad9ca31a8372d0c353",
      "maxLength": 32,
      "readOnly": true,
      "type": "string"
    }
  }
]

Debug "requestBody"

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "actions": {
            "description": "List actions patterns.",
            "items": {
              "description": "Actions pattern.",
              "properties": {
                "type": {
                  "description": "Type of supported action.",
                  "enum": [
                    "drop",
                    "forward",
                    "worker"
                  ],
                  "example": "forward",
                  "type": "string"
                },
                "value": {
                  "items": {
                    "description": "Value for action.",
                    "example": "destinationaddress@example.net",
                    "maxLength": 90,
                    "type": "string"
                  },
                  "type": "array"
                }
              },
              "required": [
                "type",
                "value"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "enabled": {
            "default": true,
            "description": "Routing rule status.",
            "enum": [
              true,
              false
            ],
            "example": true,
            "type": "boolean"
          },
          "matchers": {
            "description": "Matching patterns to forward to your actions.",
            "items": {
              "description": "Matching pattern to forward your actions.",
              "properties": {
                "field": {
                  "description": "Field for type matcher.",
                  "enum": [
                    "to"
                  ],
                  "example": "to",
                  "type": "string"
                },
                "type": {
                  "description": "Type of matcher.",
                  "enum": [
                    "literal"
                  ],
                  "example": "literal",
                  "type": "string"
                },
                "value": {
                  "description": "Value for matcher.",
                  "example": "test@example.com",
                  "maxLength": 90,
                  "type": "string"
                }
              },
              "required": [
                "type",
                "field",
                "value"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "name": {
            "description": "Routing rule name.",
            "example": "Send to user@example.net rule.",
            "maxLength": 256,
            "type": "string"
          },
          "priority": {
            "default": 0,
            "description": "Priority of the routing rule.",
            "minimum": 0,
            "type": "number"
          }
        },
        "required": [
          "actions",
          "matchers"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Debug "responses"

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "allOf": [
            {
              "allOf": [
                {
                  "properties": {
                    "errors": {
                      "example": [],
                      "items": {
                        "properties": {
                          "code": {
                            "minimum": 1000,
                            "type": "integer"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "uniqueItems": true
                      },
                      "type": "array"
                    },
                    "messages": {
                      "example": [],
                      "items": {
                        "properties": {
                          "code": {
                            "minimum": 1000,
                            "type": "integer"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "uniqueItems": true
                      },
                      "type": "array"
                    },
                    "result": {
                      "anyOf": [
                        {
                          "type": "object"
                        },
                        {
                          "items": {},
                          "type": "array"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "success": {
                      "description": "Whether the API call was successful",
                      "enum": [
                        true
                      ],
                      "example": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "errors",
                    "messages",
                    "result"
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "result": {
                      "anyOf": [
                        {
                          "type": "object"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    }
                  }
                }
              ],
              "type": "object"
            },
            {
              "properties": {
                "result": {
                  "allOf": [
                    {
                      "properties": {
                        "actions": {
                          "description": "List actions patterns.",
                          "items": {
                            "description": "Actions pattern.",
                            "properties": {
                              "type": {
                                "description": "Type of supported action.",
                                "enum": [
                                  "drop",
                                  "forward",
                                  "worker"
                                ],
                                "example": "forward",
                                "type": "string"
                              },
                              "value": {
                                "items": {
                                  "description": "Value for action.",
                                  "example": "destinationaddress@example.net",
                                  "maxLength": 90,
                                  "type": "string"
                                },
                                "type": "array"
                              }
                            },
                            "required": [
                              "type",
                              "value"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "enabled": {
                          "default": true,
                          "description": "Routing rule status.",
                          "enum": [
                            true,
                            false
                          ],
                          "example": true,
                          "type": "boolean"
                        },
                        "matchers": {
                          "description": "Matching patterns to forward to your actions.",
                          "items": {
                            "description": "Matching pattern to forward your actions.",
                            "properties": {
                              "field": {
                                "description": "Field for type matcher.",
                                "enum": [
                                  "to"
                                ],
                                "example": "to",
                                "type": "string"
                              },
                              "type": {
                                "description": "Type of matcher.",
                                "enum": [
                                  "literal"
                                ],
                                "example": "literal",
                                "type": "string"
                              },
                              "value": {
                                "description": "Value for matcher.",
                                "example": "test@example.com",
                                "maxLength": 90,
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "field",
                              "value"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "name": {
                          "description": "Routing rule name.",
                          "example": "Send to user@example.net rule.",
                          "maxLength": 256,
                          "type": "string"
                        },
                        "priority": {
                          "default": 0,
                          "description": "Priority of the routing rule.",
                          "minimum": 0,
                          "type": "number"
                        },
                        "tag": {
                          "description": "Routing rule identifier.",
                          "example": "a7e6fb77503c41d8a7f3113c6918f10c",
                          "maxLength": 32,
                          "readOnly": true,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ],
                  "type": "object"
                }
              }
            }
          ]
        }
      }
    },
    "description": "Update routing rule response"
  }
}

Debug "security"

[
  {
    "api_email": [],
    "api_key": []
  }
]