POST /accounts/{account_id}/data-security/posture/policies

Creates a new policy configuration that defines automated actions to be executed when security findings are detected. A policy can include multiple remediation and/or webhook actions that will be triggered automatically.

Servers

Path parameters

Name Type Required Description
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.

finding_type_id String Yes

The finding type this policy is associated with. All remediation actions must match this finding type.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. 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.
  3. Click Test request to test run your request to the API and see the API's response.