---
title: "Publish a document version"
method: POST
path: "/api/v1/companies/{companyId}/documents/{documentId}/versions/{versionId}/publish"
tags: ["Documents"]
---

# Publish a document version

`POST /api/v1/companies/{companyId}/documents/{documentId}/versions/{versionId}/publish`

## Request

- Base URL: `https://comply.strac.io`
- URL: `https://comply.strac.io/api/v1/companies/{companyId}/documents/{documentId}/versions/{versionId}/publish`
- Auth: HTTP bearer

Archives the prior published version and publishes the target. Writes audit-log row `v1_publish_document`. Publishing a version that is already published returns 200 with `noop: true` and publishes nothing new; if the document status row had drifted from that version, it is corrected and the response adds `repairedStatus: true`. A version that cannot be published in its current state returns 409. Send no body, or an empty JSON object (`{}`): a body with any field is refused with 400 `unsupported_field`, because this route only publishes.

Role gate: owner / admin.

Scope: `documents:write`.

## Path parameters

- `companyId` string, required
- `documentId` string, required
- `versionId` string, required

## Response `200`

Publish a document version

---

[API](https://skmtc.dev/strac/apis/strac-comply-api.md) - [All operations](https://skmtc.dev/strac/apis/strac-comply-api/llms.txt) - [OpenAPI document](https://skmtc.dev/strac/apis/strac-comply-api/revisions/d5558b64eeeb?raw)
