---
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 of a policy, cloned from the current published version (or a specified source version). Use this when you need to make any change to a published policy — content edits, PDF attachments, anything. Published.

## Path parameters

- `id` string, required

## Headers

- `X-Organization-Id` string

## Request body

- CreatePolicyVersionDto
  - `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

## Changes

- **2026-07-22** `8e0ceaf72e5b` — 2 warning, 1 info
  - removed the request property `scriptKey`
  - removed the request property `version`
  - added the new optional request property `sourceVersionId`
- **2026-06-11** `a87e7c0c5c25` — 2 breaking, 1 warning
  - added the new required request property `scriptKey`
  - added the new required request property `version`
  - removed the request property `sourceVersionId`
- **2026-06-04** `d7d0199d846f` — 1 info
  - the endpoint scheme security `oauth2` was removed from the API
- **2026-05-29** `5382c53ab431` — 1 info
  - the endpoint scheme security `oauth2` was added to the API

[Change history](https://skmtc.dev/trycompai/apis/comp-ai-api/changes/v1/policies/:id/versions/post.md)

---

[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/726b9523fb22/schema)
