Skip to main content
PATCH
Edit policy draft

Authorizations

Authorization
string
header
required

Organization Admin API key with an appropriate scope. Customer keys cannot call organization routes.

Path Parameters

policy_id
string
required

Resource identifier from a previous API response.

Required string length: 1 - 200

Body

application/json
revision
integer
required

Current edit revision. Mutations must send the latest value.

Required range: 1 <= x <= 2147483647
name
string | null
Required string length: 1 - 80
description
string | null
Maximum string length: 240
rule
string | null

A yes-or-no question ending with ?.

Required string length: 1 - 20000
direction
enum<string> | null
Available options:
request,
response,
both
mode
enum<string> | null
Available options:
monitoring,
enforcing
scope
enum<string> | null
Available options:
organization,
projects,
unattached
project_ids
string[] | null
Maximum array length: 1000
match_threshold_basis_points
integer | null

Optional match threshold from 1 to 9,999; null restores the backend default.

Required range: 1 <= x <= 9999

Response

Successful response.

id
string
required
name
string
required
description
string
required
state
enum<string>
required
Available options:
draft,
monitoring,
enforcing,
paused
revision
integer
required

Current edit revision. Mutations must send the latest value.

has_unpublished_changes
boolean
required
created_at
integer
required
updated_at
integer
required
draft
object
required
object
string
default:organization.policy
Allowed value: "organization.policy"
current_version
integer | null

Active published version number, or null before first publication.

published
object | null