---
title: "Update Policy"
method: PUT
path: "/policies/{policy_id}"
tags: ["Policies"]
---

# Update Policy

`PUT /policies/{policy_id}`

Update an existing policy.

Example Request:
```bash
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"]
    }'
```

## Path parameters

- `policy_id` string, required

## Request body

- PolicyUpdateRequest — Request body for updating a policy.
  - `policy_name` string, nullable — New name for the policy.
  - `inherit` string, nullable — Name of parent policy to inherit from.
  - `description` string, nullable — Human-readable description of the policy.
  - `guardrails_add` string[], nullable — List of guardrail names to add.
  - `guardrails_remove` string[], nullable — List of guardrail names to remove (from inherited).
  - `condition` PolicyConditionRequest — Condition for when a policy applies.
    - `model` string, nullable — Model name pattern (exact match or regex) for when policy applies.
  - `pipeline` object, nullable — Optional guardrail pipeline for ordered execution. Contains 'mode' and 'steps'.

## Response `200`

Successful Response

- PolicyDBResponse — Response for a policy from the database.
  - `policy_id` string, required — Unique ID of the policy.
  - `policy_name` string, required — Name of the policy.
  - `version_number` integer — Version number of this policy.
  - `version_status` string — One of: draft, published, production.
  - `parent_version_id` string, nullable — Policy ID this version was cloned from.
  - `is_latest` boolean — True if this is the latest version by version_number.
  - `published_at` string, date-time, nullable — When this version was published.
  - `production_at` string, date-time, nullable — When this version was promoted to production.
  - `inherit` string, nullable — Parent policy name.
  - `description` string, nullable — Policy description.
  - `guardrails_add` string[] — Guardrails to add.
  - `guardrails_remove` string[] — Guardrails to remove.
  - `condition` object, nullable — Policy condition.
  - `pipeline` object, nullable — Optional guardrail pipeline.
  - `created_at` string, date-time, nullable — When the policy was created.
  - `updated_at` string, date-time, nullable — When the policy was last updated.
  - `created_by` string, nullable — Who created the policy.
  - `updated_by` string, nullable — Who last updated the policy.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/flock/apis/litellm-api.md) · [All operations](https://skmtc.net/flock/apis/litellm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/flock/litellm-api/revisions/8fbaab4fc7c5/schema)
