---
title: "Create Policy Version"
method: POST
path: "/policies/name/{policy_name}/versions"
tags: ["policy_engine"]
---

# Create Policy Version

`POST /policies/name/{policy_name}/versions`

## Request

- Base URL: `https://api.sea-lion.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.sea-lion.ai/policies/name/{policy_name}/versions`
- Auth: API key in header `x-litellm-api-key`

Create a new draft version of a policy. Copies all fields from the source.
Source is current production if source_policy_id is not provided.

## Path parameters

- `policy_name` string, required

## Request body

- PolicyVersionCreateRequest: Request body for creating a new policy version (draft).
  - `source_policy_id` string, nullable: Policy ID to clone from. If None, clone from current production version.

## Response `200`

Successful Response

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

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-21** `f2fb14eab3f5`: 5 info
  - api tag `policy_engine` added
  - api tag `Policies` removed
  - added the optional property `definition_location` to the response with the `200` status
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - …1 more

[Operation history](https://skmtc.dev/sea-lion/apis/litellm-api/changes/policies/name/:policy_name/versions/post.md)

---

[API](https://skmtc.dev/sea-lion/apis/litellm-api.md) · [All operations](https://skmtc.dev/sea-lion/apis/litellm-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sea-lion/apis/litellm-api/revisions/f2fb14eab3f5?raw)
