> ## Documentation Index
> Fetch the complete documentation index at: https://opentrain.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Publish Manual

> Publish an immutable, audience-scoped snapshot at an exact manual revision.

Publishes an immutable snapshot of the manual at an exact head revision. Publishing is owner-governed: it requires the explicit `instructions:publish` scope **and** the workspace `OWNER` role. `baseRevisionNumber` must equal the current head — if the manual moved since you read it, the publish fails instead of snapshotting content you haven't seen. Honors the `Idempotency-Key` header.

**Requirements:** `instructions:publish` + workspace `OWNER` role + a verified (claimed) account.

## Request

<ParamField path="manualId" type="string" required>
  The manual id.
</ParamField>

<ParamField body="baseRevisionNumber" type="number" required>
  The head revision you intend to publish — a guard, not a pointer to history.
</ParamField>

<ParamField body="audiences" type="string[]">
  Audiences this publication serves. If omitted or empty, OpenTrain serves all four audiences: `ADMIN`, `CONTRIBUTOR`, `REVIEWER`, and `WORKER`. Pass an explicit non-empty list for a narrower release.
</ParamField>

<ParamField body="note" type="string">
  Release note recorded on the publication.
</ParamField>

## Response

Returns `201`.

<ResponseField name="publication" type="object">
  The publication summary, including `publicationNumber` and `contentHash`.
</ResponseField>

<ResponseField name="idempotentReplay" type="boolean">
  Present and `true` on an `Idempotency-Key` replay.
</ResponseField>
