Create a script behavior rule

All products Creates a script behavior rule for the security policy. The ruleId is generated by the backend and returned in the response. To clone a rule, submit the same rule body with a new ruleName.

Path Params
int64
required

A unique identifier for each configuration.

integer
required

A unique identifier for each version of a configuration.

string
required

A unique identifier for a security policy.

Query Params
string

For customers who manage more than one account, this runs the operation from another account. The Identity and Access Management API provides a list of available account switch keys.

Body Params

A script behavior rule that monitors or controls how scripts access sensitive data, cookies, network resources, or local storage.

string
enum
required

The action taken when the rule's conditions are matched. deny blocks the activity, alert logs it without blocking, and none disables the rule.

Allowed:
string
enum
required

The type of script activity the rule monitors or controls.

Allowed:
conditions
object
required

Conditions that determine which pages and scripts the rule applies to.

string

An optional description of the rule's purpose.

integer

A unique identifier for the rule, generated by the backend. Returned in responses; not included in POST request bodies.

string
required

The display name for the rule.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
URL
LoadingLoading…
Response
Choose an example:
application/json
application/problem+json