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

# POST /api/agent-workflows/{id}/publish

> Publish a workflow

```text theme={"system"}

POST /api/agent-workflows/{id}/publish

```

Snapshots the canvas into `agent_workflow_versions`, immediately deploys to sandbox (`agent_deployments` with `environment='sandbox'`), and emits `runtime:agent-config:invalidated` to refresh the runtime config cache.

### Body

```json theme={"system"}
{
  "changeDescription": "Initial release"
}

```

To deploy to production:

```text theme={"system"}

POST /api/agent-workflows/{id}/deploy/{version}

```
