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

# roark agent draft publish

> Publish the draft

Makes the draft the live version, numbered v1, v2, ... Fails with 409 if the draft was edited after expectedRevision, if another version was published since the draft started, or if it changes nothing; with 400 and the issues if the version cannot run.

```bash Synopsis theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
roark agent draft publish <agent-id> [options]
```

> [!NOTE]
>
> Calls `POST /v1/agent/{agentId}/draft/publish`

## Arguments

**agent-id** `string` *required*

The agent-id.

## Options

**--expected-revision** `integer` *required*

The draft revision you reviewed.

**--summary** `string`

What changed.

## Example

```bash theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
roark agent draft publish <agent-id> --expected-revision <value>
```

Every command also takes the [global options](https://docs.roark.ai/cli-reference/overview.md#global-options) and sets one
of the [exit codes](https://docs.roark.ai/cli-reference/overview.md#exit-codes).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.