Skip to content
Start here

Content Policies

List content policies
client.emailSecurity.settings.contentPolicies.list(ContentPolicyListParams { account_id, direction, enabled, 6 more } params, RequestOptionsoptions?): V4PagePaginationArray<ContentPolicyListResponse { id, created_at, enabled, 6 more } >
GET/accounts/{account_id}/email-security/settings/content_policies
Get a content policy
client.emailSecurity.settings.contentPolicies.get(stringpolicyID, ContentPolicyGetParams { account_id } params, RequestOptionsoptions?): ContentPolicyGetResponse { id, created_at, enabled, 6 more }
GET/accounts/{account_id}/email-security/settings/content_policies/{policy_id}
Create a content policy
client.emailSecurity.settings.contentPolicies.create(ContentPolicyCreateParams { account_id, enabled, name, 4 more } params, RequestOptionsoptions?): ContentPolicyCreateResponse { id, created_at, enabled, 6 more }
POST/accounts/{account_id}/email-security/settings/content_policies
Update a content policy
client.emailSecurity.settings.contentPolicies.edit(stringpolicyID, ContentPolicyEditParams { account_id, enabled, expires_at, 4 more } params, RequestOptionsoptions?): ContentPolicyEditResponse { id, created_at, enabled, 6 more }
PATCH/accounts/{account_id}/email-security/settings/content_policies/{policy_id}
Delete a content policy
client.emailSecurity.settings.contentPolicies.delete(stringpolicyID, ContentPolicyDeleteParams { account_id } params, RequestOptionsoptions?): ContentPolicyDeleteResponse { id }
DELETE/accounts/{account_id}/email-security/settings/content_policies/{policy_id}
Batch content policy operations
client.emailSecurity.settings.contentPolicies.batch(ContentPolicyBatchParams { account_id, deletes, patches, 2 more } params, RequestOptionsoptions?): ContentPolicyBatchResponse { deletes, patches, posts, puts }
POST/accounts/{account_id}/email-security/settings/content_policies/batch
ModelsExpand Collapse
ContentPolicyListResponse { id, created_at, enabled, 6 more }

A content policy pattern that matches against the subject or body of an email.

id?: string

Content policy identifier.

formatuuid
created_at?: string
formatdate-time
enabled?: boolean

Whether the policy is active.

expires_at?: string | null

Timestamp at which the policy expires. After this time, Email Security ignores the policy. The value must lie in the future. Send null to clear the expiration.

formatdate-time
modified_at?: string
formatdate-time
name?: string

Human-readable name of the policy.

maxLength256
minLength1
notes?: string | null

Optional note describing the purpose of the policy.

maxLength4096
pattern?: string

Regular expression the policy matches against.

maxLength2048
minLength1
targets?: Array<"SUBJECT" | "BODY">

Parts of the email the pattern is matched against.

One of the following:
"SUBJECT"
"BODY"
ContentPolicyGetResponse { id, created_at, enabled, 6 more }

A content policy pattern that matches against the subject or body of an email.

id?: string

Content policy identifier.

formatuuid
created_at?: string
formatdate-time
enabled?: boolean

Whether the policy is active.

expires_at?: string | null

Timestamp at which the policy expires. After this time, Email Security ignores the policy. The value must lie in the future. Send null to clear the expiration.

formatdate-time
modified_at?: string
formatdate-time
name?: string

Human-readable name of the policy.

maxLength256
minLength1
notes?: string | null

Optional note describing the purpose of the policy.

maxLength4096
pattern?: string

Regular expression the policy matches against.

maxLength2048
minLength1
targets?: Array<"SUBJECT" | "BODY">

Parts of the email the pattern is matched against.

One of the following:
"SUBJECT"
"BODY"
ContentPolicyCreateResponse { id, created_at, enabled, 6 more }

A content policy pattern that matches against the subject or body of an email.

id?: string

Content policy identifier.

formatuuid
created_at?: string
formatdate-time
enabled?: boolean

Whether the policy is active.

expires_at?: string | null

Timestamp at which the policy expires. After this time, Email Security ignores the policy. The value must lie in the future. Send null to clear the expiration.

formatdate-time
modified_at?: string
formatdate-time
name?: string

Human-readable name of the policy.

maxLength256
minLength1
notes?: string | null

Optional note describing the purpose of the policy.

maxLength4096
pattern?: string

Regular expression the policy matches against.

maxLength2048
minLength1
targets?: Array<"SUBJECT" | "BODY">

Parts of the email the pattern is matched against.

One of the following:
"SUBJECT"
"BODY"
ContentPolicyEditResponse { id, created_at, enabled, 6 more }

A content policy pattern that matches against the subject or body of an email.

id?: string

Content policy identifier.

formatuuid
created_at?: string
formatdate-time
enabled?: boolean

Whether the policy is active.

expires_at?: string | null

Timestamp at which the policy expires. After this time, Email Security ignores the policy. The value must lie in the future. Send null to clear the expiration.

formatdate-time
modified_at?: string
formatdate-time
name?: string

Human-readable name of the policy.

maxLength256
minLength1
notes?: string | null

Optional note describing the purpose of the policy.

maxLength4096
pattern?: string

Regular expression the policy matches against.

maxLength2048
minLength1
targets?: Array<"SUBJECT" | "BODY">

Parts of the email the pattern is matched against.

One of the following:
"SUBJECT"
"BODY"
ContentPolicyDeleteResponse { id }
id: string

Content policy identifier.

formatuuid
ContentPolicyBatchResponse { deletes, patches, posts, puts }
deletes?: Array<Delete>
id: string

Content policy identifier.

formatuuid
patches?: Array<Patch>
id?: string

Content policy identifier.

formatuuid
created_at?: string
formatdate-time
enabled?: boolean

Whether the policy is active.

expires_at?: string | null

Timestamp at which the policy expires. After this time, Email Security ignores the policy. The value must lie in the future. Send null to clear the expiration.

formatdate-time
modified_at?: string
formatdate-time
name?: string

Human-readable name of the policy.

maxLength256
minLength1
notes?: string | null

Optional note describing the purpose of the policy.

maxLength4096
pattern?: string

Regular expression the policy matches against.

maxLength2048
minLength1
targets?: Array<"SUBJECT" | "BODY">

Parts of the email the pattern is matched against.

One of the following:
"SUBJECT"
"BODY"
posts?: Array<Post>
id?: string

Content policy identifier.

formatuuid
created_at?: string
formatdate-time
enabled?: boolean

Whether the policy is active.

expires_at?: string | null

Timestamp at which the policy expires. After this time, Email Security ignores the policy. The value must lie in the future. Send null to clear the expiration.

formatdate-time
modified_at?: string
formatdate-time
name?: string

Human-readable name of the policy.

maxLength256
minLength1
notes?: string | null

Optional note describing the purpose of the policy.

maxLength4096
pattern?: string

Regular expression the policy matches against.

maxLength2048
minLength1
targets?: Array<"SUBJECT" | "BODY">

Parts of the email the pattern is matched against.

One of the following:
"SUBJECT"
"BODY"
puts?: Array<Put>
id?: string

Content policy identifier.

formatuuid
created_at?: string
formatdate-time
enabled?: boolean

Whether the policy is active.

expires_at?: string | null

Timestamp at which the policy expires. After this time, Email Security ignores the policy. The value must lie in the future. Send null to clear the expiration.

formatdate-time
modified_at?: string
formatdate-time
name?: string

Human-readable name of the policy.

maxLength256
minLength1
notes?: string | null

Optional note describing the purpose of the policy.

maxLength4096
pattern?: string

Regular expression the policy matches against.

maxLength2048
minLength1
targets?: Array<"SUBJECT" | "BODY">

Parts of the email the pattern is matched against.

One of the following:
"SUBJECT"
"BODY"