---
title: "Restore a workflow version"
method: POST
path: "/v1/workflows/{workflowId}/versions/{version}/restore"
tags: ["Workflows"]
---

# Restore a workflow version

`POST /v1/workflows/{workflowId}/versions/{version}/restore`

Replace the current graph with the named version's snapshot. Before the swap, the current graph is itself snapshotted as a new version, so a restore is reversible. The workflow must be in `draft` or `paused` status (same gate as a normal graph edit). The returned workflow carries `restoredFromVersion` so the UI can surface which version was rolled back to.

## Path parameters

- `workflowId` string, required
- `version` integer, required

## Response `200`

Workflow restored to the named version

- object
  - `success` boolean
  - `workflow` object
    - `id` string
    - `name` string
    - `description` string
    - `status` string
    - `entryNodeId` string, nullable
    - `nodeCount` integer
    - `updatedAt` string, date-time
  - `restoredFromVersion` integer

## Other responses

- `400` — Workflow is not draft/paused, or the named version's graph is invalid for the current platform
- `401` — Unauthorized
- `404` — Resource not found

---

[API](https://skmtc.net/zernio/apis/zernio-api.md) · [All operations](https://skmtc.net/zernio/apis/zernio-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/zernio/zernio-api/versions/51932b099b2f/schema)
