v22

latestOpenAPI 3.0.0raw.githubusercontent.com2026-07-01140308542.4 KB
PolicyVersions

Create a new immutable policy version

post/zones/{zone_id}/policies/{policy_id}/versions

Path parameters

zone_idstring required

The zone identifier

policy_idstring required

The policy identifier

Headers

X-API-Versionstring

API version header (date-based, e.g. 2026-02-01)

X-Client-Request-IDstring uuid

Unique request identifier specified by the originating caller and passed along by proxies.

Request body

cedar_jsonobject nullable

Cedar policy in JSON representation. Mutually exclusive with cedar_raw.

cedar_rawstring nullable

Cedar policy in human-readable Cedar syntax. Mutually exclusive with cedar_json.

schema_versionstring required

Schema version to validate this policy against. Must not be archived.

Response

The newly created policy version

idstring required
policy_idstring required
zone_idstring required
versioninteger required
schema_versionstring required

Schema version this policy was validated against when created.

cedar_jsonobject nullable

Cedar policy in JSON representation. Populated by default and when format=json is passed; null when format=cedar narrows the response to the text representation only.

cedar_rawstring nullable

Cedar policy in human-readable syntax. Populated by default and when format=cedar is passed; null when format=json narrows the response to the JSON representation only.

shastring required

Hex-encoded content hash

archived_atstring date-time nullable
archived_bystring nullable
created_atstring date-time required
created_bystring required
owner_type'platform' | 'customer' required

Who manages this policy version:

  • "platform" — managed by the Keycard platform (system policy versions).
  • "customer" — managed by the tenant (custom policy versions).