PATCH /accounts/{account_id}/gateway/rules/{rule_id}
Update select fields of an existing Zero Trust Gateway rule. Only the fields provided in the request body are updated. This endpoint supports a limited subset of fields (name, description, precedence, enabled). To update other fields such as action, traffic, identity, device_posture, rule_settings, schedule, or expiration, use the PUT endpoint for a full rule replacement.
Servers
- https://api.cloudflare.com/client/v4
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
account_id |
String | Yes | |
rule_id |
String | Yes |
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
name |
String | No |
Specify the rule name. |
description |
String | No |
Specify the rule description. |
enabled |
Boolean | No |
Specify whether the rule is enabled. Default value: false |
precedence |
Integer | No |
Set the order of your rules. Lower values indicate higher precedence. At each processing phase, evaluate applicable rules in ascending order of this value. Refer to Order of enforcement to manage precedence via Terraform. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.