---
title: Policies
---

[Skip to content](#%5Ftop) 

[API Reference](https://developers.cloudflare.com/api/typescript)

[Page Shield](https://developers.cloudflare.com/api/typescript/resources/page%5Fshield)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Policies

##### [List content security rules](https://developers.cloudflare.com/api/typescript/resources/page%5Fshield/subresources/policies/methods/list)

client.pageShield.policies.list(PolicyListParams { zone\_id } params, RequestOptionsoptions?): SinglePage<[PolicyListResponse](https://developers.cloudflare.com/api/typescript/resources/page%5Fshield#%28resource%29%20page%5Fshield.policies%20%3E%20%28model%29%20policy%5Flist%5Fresponse%20%3E%20%28schema%29) { id, action, description, 3 more } \>

GET/zones/{zone\_id}/page\_shield/policies

##### [Get a content security rule](https://developers.cloudflare.com/api/typescript/resources/page%5Fshield/subresources/policies/methods/get)

client.pageShield.policies.get(stringpolicyID, PolicyGetParams { zone\_id } params, RequestOptionsoptions?): [PolicyGetResponse](https://developers.cloudflare.com/api/typescript/resources/page%5Fshield#%28resource%29%20page%5Fshield.policies%20%3E%20%28model%29%20policy%5Fget%5Fresponse%20%3E%20%28schema%29) { id, action, description, 3 more } | null

GET/zones/{zone\_id}/page\_shield/policies/{policy\_id}

##### [Create a content security rule](https://developers.cloudflare.com/api/typescript/resources/page%5Fshield/subresources/policies/methods/create)

client.pageShield.policies.create(PolicyCreateParams { zone\_id, action, description, 3 more } params, RequestOptionsoptions?): [PolicyCreateResponse](https://developers.cloudflare.com/api/typescript/resources/page%5Fshield#%28resource%29%20page%5Fshield.policies%20%3E%20%28model%29%20policy%5Fcreate%5Fresponse%20%3E%20%28schema%29) { id, action, description, 3 more } | null

POST/zones/{zone\_id}/page\_shield/policies

##### [Update a content security rule](https://developers.cloudflare.com/api/typescript/resources/page%5Fshield/subresources/policies/methods/update)

client.pageShield.policies.update(stringpolicyID, PolicyUpdateParams { zone\_id, action, description, 3 more } params, RequestOptionsoptions?): [PolicyUpdateResponse](https://developers.cloudflare.com/api/typescript/resources/page%5Fshield#%28resource%29%20page%5Fshield.policies%20%3E%20%28model%29%20policy%5Fupdate%5Fresponse%20%3E%20%28schema%29) { id, action, description, 3 more } | null

PUT/zones/{zone\_id}/page\_shield/policies/{policy\_id}

##### [Delete a content security rule](https://developers.cloudflare.com/api/typescript/resources/page%5Fshield/subresources/policies/methods/delete)

client.pageShield.policies.delete(stringpolicyID, PolicyDeleteParams { zone\_id } params, RequestOptionsoptions?): void

DELETE/zones/{zone\_id}/page\_shield/policies/{policy\_id}

##### ModelsExpand Collapse 

PolicyListResponse { id, action, description, 3 more } 

id: string

Identifier

maxLength32

action: "allow" | "log" | "add\_reporting\_directives"

The action to take if the expression matches

One of the following:

"allow"

"log"

"add\_reporting\_directives"

description: string

A description for the policy

enabled: boolean

Whether the policy is enabled

expression: string

The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax

value: string

The policy which will be applied

PolicyGetResponse { id, action, description, 3 more } 

id: string

Identifier

maxLength32

action: "allow" | "log" | "add\_reporting\_directives"

The action to take if the expression matches

One of the following:

"allow"

"log"

"add\_reporting\_directives"

description: string

A description for the policy

enabled: boolean

Whether the policy is enabled

expression: string

The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax

value: string

The policy which will be applied

PolicyCreateResponse { id, action, description, 3 more } 

id: string

Identifier

maxLength32

action: "allow" | "log" | "add\_reporting\_directives"

The action to take if the expression matches

One of the following:

"allow"

"log"

"add\_reporting\_directives"

description: string

A description for the policy

enabled: boolean

Whether the policy is enabled

expression: string

The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax

value: string

The policy which will be applied

PolicyUpdateResponse { id, action, description, 3 more } 

id: string

Identifier

maxLength32

action: "allow" | "log" | "add\_reporting\_directives"

The action to take if the expression matches

One of the following:

"allow"

"log"

"add\_reporting\_directives"

description: string

A description for the policy

enabled: boolean

Whether the policy is enabled

expression: string

The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax

value: string

The policy which will be applied