---
title: "Restore a workflow revision"
method: POST
path: "/workflows/{workflow_id}/code/restore"
tags: ["workflows"]
---

# Restore a workflow revision

`POST /workflows/{workflow_id}/code/restore`

Creates a new revision with the source of the named revision. Does NOT dedup against the current revision so the action is auditable in the revision history.

## Path parameters

- `workflow_id` string, uuid, required — workflow identifier

## Request body

- WorkflowRestoreRevisionRequest — Request to restore a previous code revision. The named revision's source is copied into a new revision; history is preserved.
  - `$schema` string, uri — A URL to the JSON Schema for this object.
  - `revision_id` string, required — Revision to restore.

## Response `200`

OK

- WorkflowSaveCodeResponse — Returned from POST /workflows/:id/code.
  - `$schema` string, uri — A URL to the JSON Schema for this object.
  - `no_op` boolean, required — True when the submitted source's sha256 matched the prior current revision; no new row was inserted, no pointer was changed.
  - `revision` integer, required — Per-workflow monotonic revision number.
  - `revision_id` string, required — Workflow_revisions.id of the active revision after the save.

## Other responses

- `default` — Error

---

[API](https://skmtc.dev/axilioai/apis/axilio-api.md) · [All operations](https://skmtc.dev/axilioai/apis/axilio-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/axilioai/axilio-api/revisions/8a66f81813b3/schema)
