The Policy object
string
required
Unique policy identifier (UUID).
string
required
UUID of the organization that owns this policy.
string
required
Human-readable policy name.
string
Optional description of what the policy does.
string
Target LLM model (e.g.,
gpt-4). null means the policy applies to all models.string
required
Action to take when the policy is triggered. One of:
allow, block, alert, require_approval.object
JSON object defining the conditions under which the policy fires. See Policy conditions below.
boolean
required
Whether the policy is currently active. Disabled policies are not evaluated.
string
required
ISO 8601 creation timestamp.
string
required
ISO 8601 last-updated timestamp.
Policy conditions
Theconditions object expresses the criteria that must match for the policy to fire. Conditions use key-value pairs with operators:
engineering list.
List policies
Returns a cursor-paginated list of all policies in your organization.Query parameters
string
Pagination cursor from
next_cursor in the previous response.integer
default:"25"
Items per page (1–100).
Example
Create a policy
Creates a new policy for your organization.Request body
string
required
Human-readable policy name. Maximum 255 characters.
string
required
Action to take when the policy fires. One of:
allow, block, alert, require_approval.string
Optional description.
string
Target model name. Omit or set to
null to apply to all models.object
JSON conditions object. See Policy conditions.
boolean
default:"true"
Whether the policy is active immediately after creation.
Example
201 Created)
Get a policy
Returns a single policy by ID.Path parameters
string
required
Policy UUID.
Example
200 OK)
Update a policy
Updates an existing policy. All fields are optional — only the fields you include are changed.Path parameters
string
required
Policy UUID.
Request body
string
New policy name. Maximum 255 characters.
string
New description.
string
New target model. Set to
null to apply to all models.string
New action:
allow, block, alert, or require_approval.object
Replacement conditions object.
boolean
Enable or disable the policy.
Example
200 OK) — returns the updated Policy object.
Delete a policy
Permanently deletes a policy. This action cannot be undone.Path parameters
string
required
Policy UUID.
Example
204 No Content with an empty body.