policy_engine

Update Policy

Update an existing policy.

Example Request:

curl -X PUT "http://localhost:4000/policies/123e4567-e89b-12d3-a456-426614174000" \
    -H "Authorization: Bearer <your_api_key>" \
    -H "Content-Type: application/json" \
    -d '{
        "description": "Updated description",
        "guardrails_add": ["pii_masking", "toxicity_filter"]
    }'
put/policies/{policy_id}

Path parameters

policy_idstring required

Request body

descriptionstring nullable

Human-readable description of the policy.

guardrails_addstring[] nullable

List of guardrail names to add.

guardrails_removestring[] nullable

List of guardrail names to remove (from inherited).

inheritstring nullable

Name of parent policy to inherit from.

pipelineobject nullable

Optional guardrail pipeline for ordered execution. Contains 'mode' and 'steps'.

policy_namestring nullable

New name for the policy.

Response

Successful Response

conditionobject nullable

Policy condition.

created_atstring date-time nullable

When the policy was created.

created_bystring nullable

Who created the policy.

descriptionstring nullable

Policy description.

guardrails_addstring[]

Guardrails to add.

guardrails_removestring[]

Guardrails to remove.

inheritstring nullable

Parent policy name.

is_latestboolean

True if this is the latest version by version_number.

parent_version_idstring nullable

Policy ID this version was cloned from.

pipelineobject nullable

Optional guardrail pipeline.

policy_idstring required

Unique ID of the policy.

policy_namestring required

Name of the policy.

production_atstring date-time nullable

When this version was promoted to production.

published_atstring date-time nullable

When this version was published.

updated_atstring date-time nullable

When the policy was last updated.

updated_bystring nullable

Who last updated the policy.

version_numberinteger

Version number of this policy.

version_statusstring

One of: draft, published, production.

Changes