Endpoint referencePolicies
Update a policy
PATCH
Changing match, conditions, action, justification_template or expires_days increments version.
bearerAuthheader
AuthorizationBearer <token>API token created in Settings → API. Scopes are attached to the token; each operation lists its required scope in x-scope.
id*stringFormat
uuidorg_id?stringPartners only (orgs:manage): act on this child organization. May also be sent as org_id in JSON bodies.
Format
uuidapplication/json- body
name?stringdescription?string|nullmode?stringValue in
"recommend""auto"priority?integermatch?conditions?action?stringValue in
"authorize""needs_review""block"justification_template?string|nullexpires_days?integer|nullactive?booleanPolicy
application/json- response
id?stringFormat
uuidorg_id?stringFormat
uuidstore_id?|Format
uuidname?stringdescription?string|nullversion?integeractive?booleanmode?stringValue in
"recommend""auto"priority?integerLower = evaluated first; first match decides
match?conditions?action?stringValue in
"authorize""needs_review""block"justification_template?|Supports {domain} {vendor} {path}
expires_days?integer|nullis_default?booleancreated_at?stringFormat
date-timeupdated_at?stringFormat
date-timecurl -X PATCH "https://example.com/policies/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{ "mode": "auto", "active": true }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b", "store_id": "7fe87115-950c-4ae8-bd7e-970406bc9ac0", "name": "string", "description": "string", "version": 0, "active": true, "mode": "recommend", "priority": 0, "match": { "origin": "first_party", "domain": [ "string" ], "path_glob": [ "string" ], "category": [ "string" ], "vendor_id": [ "string" ] }, "conditions": { "same_origin": true, "prevalence_min": 0, "no_sensitive_field_access": true, "not_in_threat_list": true, "in_threat_list": true, "store_provider": true, "max_size_kb": 0, "has_integrity_attr": true }, "action": "authorize", "justification_template": "string", "expires_days": 0, "is_default": true, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}