---
title: "Create policy version"
method: POST
path: "/v1/policies/{id}/versions"
tags: ["Policies"]
---

# Create policy version

`POST /v1/policies/{id}/versions`

Creates a new draft version based on the current published version (or a specified source version).

## Path parameters

- `id` string, required

## Headers

- `X-Organization-Id` string

## Request body

- CreateVersionDto
  - `sourceVersionId` string — Optional version ID to base the new version on
  - `changelog` string — Optional changelog to associate with the new version

## Response `201`

Policy version created

- object
  - `versionId` string
  - `version` number

## Other responses

- `400` — Invalid request
- `401` — Unauthorized
- `404` — Resource not found

---

[API](https://skmtc.dev/trycompai/apis/comp-ai-api.md) · [All operations](https://skmtc.dev/trycompai/apis/comp-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/trycompai/comp-ai-api/revisions/ac8d1e4e2e79/schema)
