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

# Publish policy version

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

Publishes a draft policy version, making it the active/current version of the policy. Pass the versionId of the draft you want to publish — for example one created via create-policy-version and then edited.

## Path parameters

- `id` string, required

## Headers

- `X-Organization-Id` string

## Request body

- PublishVersionDto
  - `versionId` string — Version ID to publish. PASS THIS after update-version to publish your edits — omitting it publishes stale draftContent (loses your changes).
  - `setAsActive` boolean — Whether to set this version as the active version
  - `changelog` string — Optional changelog to associate with the published version

## Response `200`

Version published

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

## Other responses

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

---

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