canonical

Create a draft policy version

Prepare a new immutable policy snapshot without activating it.

post/api/v1/actions/{action_id}/policy-versions

Request

  • Base URL
    https://app.graypass.org (the document declares no server; this is the origin it was published from)
  • URL
    https://app.graypass.org/api/v1/actions/{action_id}/policy-versions
  • Auth
    HTTP bearer

Path parameters

action_idstring required

Protected-action record identifier returned by action creation. Supply this record ID in the path; use the dotted action key in authorization requests.

Request body

allowed_audiencesstring[] nullable

Relying-party audience identifiers allowed to receive proofs for this action.

allowed_callersstring[] nullable

Credential identifiers allowed to authorize this action. An empty list permits any eligible server credential in the same environment.

context_schemaobject nullable

JSON Schema object applied to authorization context. Include every business value that must be bound to approval.

proof_ttl_secondsinteger nullable

Proof lifetime in seconds, measured from issuance; the accepted range is 30-900 seconds.

Response

New immutable draft policy and its assigned version number.

actionstring required

Identifier of the protected-action record owning this version.

activated_atstring nullable

Policy activation time as an ISO 8601 timestamp, or null for a draft.

allowed_audiencesstring[] required

Relying-party audience identifiers allowed to receive proofs for this action.

allowed_callersstring[] required

Credential identifiers allowed to authorize this action. An empty list permits any eligible server credential in the same environment.

content_hashstring required

Digest of the immutable policy content; retain it when comparing policy configurations.

context_schemaobject required

JSON Schema object applied to authorization context. Include every business value that must be bound to approval.

created_atstring required

Creation time as an ISO 8601 timestamp.

idstring required

Identifier of this record. Treat it as opaque and retain it for subsequent operations.

proof_ttl_secondsinteger required

Proof lifetime in seconds, measured from issuance; the accepted range is 30-900 seconds.

retired_atstring nullable

Policy retirement time as an ISO 8601 timestamp, or null when not retired.

status'draft' | 'active' | 'retired' required

Lifecycle state of this record; use the operation-specific values listed in the schema.

versioninteger required

Monotonically assigned policy version number for the action.

Changes

No recorded changes to this operation across all 1 revision of this API.