v1

latestOpenAPI 3.1.02026-08-04197263.3 KB

Create Policy

Create a new policy.

The policy will be created under the organization associated with the API key. Requires admin role.

Docs: Guide | API Reference

post/policies

Request body

namestring required

Policy name

descriptionstring nullable

Policy description

categoriesobject

Rule definitions (key -> description)

rule_modesobject

Per-rule enforcement mode: "block" (default), "observe", or "disabled"

modestring nullable

Policy mode

pre_violation_thresholdnumber nullable
pre_jb_thresholdnumber nullable
post_violation_thresholdnumber nullable
post_violation_jb_thresholdnumber nullable
scanners_configobject nullable
block_messagestring nullable

Response

Successful Response

idstring required
namestring required
descriptionstring nullable
rulesobject required
rule_modesobject
modestring nullable
pre_violation_thresholdnumber nullable
pre_jb_thresholdnumber nullable
post_violation_thresholdnumber nullable
post_violation_jb_thresholdnumber nullable
scanners_configobject nullable
block_messagestring nullable
is_presetboolean
created_atstring date-time nullable
updated_atstring date-time nullable