> Every page of the Heythere docs is listed in https://heythere.io/docs/llms.txt: fetch it to find a page instead of guessing its URL.

# Versions: publish an automation without breaking chats

> Edit an automation's draft freely, save versions of it, and publish one without breaking the conversations already under way.

The repair shop wants its automation to ask Camille for a pickup time before it tells her the bike is ready. Its agent changes the draft and saves it as a version, then an administrator publishes it. An automation has one draft, the versions saved from it, and at most one published version, much like code and its commits.

- **Draft.** Members and their agents edit it freely. Nothing in the draft reaches a contact.
- **Version.** A snapshot of the draft that never changes, with a message saying what changed. Its author saves it as major (3 after 2.1) when it changes the graph's shape or a trigger, and as minor (2.2) otherwise.
- **Published version.** The version whose triggers are active. Only [administrators](https://heythere.io/docs/concepts/organizations-and-workspaces) of the workspace publish, because publishing starts messaging contacts.
- **Restore.** Copies a version into the draft, without losing the draft's changes or touching the published version.

Publishing refuses a version that would fail a run, naming the trigger or step of each problem: a value read before any step writes it, an undeclared [attribute](https://heythere.io/docs/concepts/attributes), a condition comparing values of different kinds, or an [AI](https://heythere.io/docs/concepts/ai) model or reasoning effort Heythere does not offer. `getAutomation` lists them for the draft as `draftProblems`.

A [run](https://heythere.io/docs/concepts/runs) stays on the version it started with. If Camille is already answering when the shop publishes, she finishes on the previous version, so publishing never breaks a conversation under way.

## In the API

Every operation is a REST endpoint and, unless marked REST only, an MCP tool of the same name. [The OpenAPI document](https://app.heythere.io/api/openapi.json) describes their parameters, payloads, and errors.


- `createAutomationVersion`: Version an automation's draft. `POST /api/organizations/{organizationId}/workspaces/{workspaceId}/automations/{automationId}/versions`
- `listAutomationVersions`: List automation versions. `GET /api/organizations/{organizationId}/workspaces/{workspaceId}/automations/{automationId}/versions`
- `getAutomationVersion`: Get an automation version. `GET /api/organizations/{organizationId}/workspaces/{workspaceId}/automations/{automationId}/versions/{automationVersionId}`
- `publishAutomationVersion`: Publish an automation version. `PUT /api/organizations/{organizationId}/workspaces/{workspaceId}/automations/{automationId}/published-version`
- `restoreAutomationVersion`: Restore an automation version. `POST /api/organizations/{organizationId}/workspaces/{workspaceId}/automations/{automationId}/versions/{automationVersionId}/restore`
