Skip to main content
PUT
Publish a version of a rego policy

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

identifier
string
required
org
string
required

Body

application/json
input_schema
enum<string>
required

Shape of the input the policy is written against: one trail, or a set of them

Available options:
trail,
trails
files
Files · object
required

Rego bundle as relative path to source; a single file is one entry

name
string | null

Display name. Omit to keep the current one; required when the policy does not exist yet, and never cleared

description
string | null

Omit to keep the current description, or send null to clear it

comment
string
default:""

Why this version was published, kept with the version

Response

Successful Response

identifier
string
required

Identifier of the policy this version belongs to

version
integer
required

Version number, counting up from 1

status
enum<string>
required

pending until the version has been validated, then valid, rejected if the policy is at fault, or failed if we are

Available options:
pending,
valid,
rejected,
failed
digest
string
required

sha256: and the hex digest of the bundle's files, which is what a decision cites

input_schema
enum<string>
required

Shape of the input this version is written against

Available options:
trail,
trails
comment
string
required

Why this version was published

created_at
number
required

Unix timestamp the version was published at

created_by
string
required

Display name of the user who published it

validated_at
number | null

Unix timestamp the version left pending

opa_version
string | null

Version of OPA that validated it, absent when pending or failed

entrypoint
string | null

Policy package the evaluator found, present when valid

params_schema
Params Schema · object | null

JSON Schema the policy declares for its params, present when valid and the policy declares one

error
ValidationErrorDetail · object | null

Why the version is not valid, present when rejected or failed

Last modified on October 9, 2026