PUT /accounts/{account_id}/data-security/posture/policies/{policy_id}
Updates an existing policy configuration and replaces its actions.
Servers
- https://api.cloudflare.com/client/v4
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
policy_id |
String | Yes |
Policy configuration ID |
account_id |
String | Yes |
Cloudflare account ID for the user making the request. |
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 |
|---|---|---|---|
integration_ids[] |
Array | No |
The integrations this policy applies to. Required when applies_to_all_integrations is false. |
actions |
Object | Yes |
Actions to execute when this policy is triggered, grouped by action type. A policy must contain at least one action across all groups and may include at most one remediation. |
actions.webhook_configs[] |
Array | No |
Webhook actions to execute. |
actions.webhook_configs[].webhook_config_id |
String | Yes |
The ID of the webhook configuration to use. |
actions.remediation_types[] |
Array | No |
Remediation actions to execute (at most one). |
actions.remediation_types[].remediation_type_id |
String | Yes |
The ID of the remediation type to execute. |
description |
String | No |
Optional description of what this policy does. |
display_name |
String | Yes |
Display name for the policy configuration. |
enabled |
Boolean | Yes |
Boolean specifying if the policy is enabled or disabled. |
applies_to_all_integrations |
Boolean | Yes |
When true, the policy applies to all integrations for the account. When false, integration_ids must be provided. |
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.