remagicaDocs home
API referenceWorkflows

Restore a version

POST
/workflow-revisions/{revisionId}/restore

Needs a key withworkflows:write

Brings a version back: the workflow's document becomes the version's, saved as a new restore version (what it was just before is saved as an auto one). Send the workflow version you last read; if someone saved since, you get 409. Results aren't touched.

Requires scope workflows:write.

Authorization

apiKey
headerx-api-key<token>

An API key of your workspace (rmg_…), created in the web app. It acts for that workspace, not for a person, and keeps working when its creator leaves.

Path Parameters

revisionId*string
Length1 <= length <= 128

Request Body

application/json
  1. body
version*integer
Range1 <= value

Response Body

The workflow's summary, with its new version, and the new version.

application/json
  1. response
revision*
workflow*
Example Request
curl -X POST 'https://api.remagica.com/api/v1/workflow-revisions/6c46ebd8-5b3d-4f60-8e2a-1d9c6b4f7e05/restore' \  -H 'Content-Type: application/json' \  -d '{  "version": 3}'
Example Response
{  "revision": {    "author": {      "id": "a5614527-5b3d-4f60-8e2a-1d9c6b4f7e05",      "image": "string",      "name": "Autumn campaign"    },    "createdAt": "2026-10-21T12:00:00.000Z",    "id": "a5614527-5b3d-4f60-8e2a-1d9c6b4f7e05",    "kind": "auto",    "runId": "599e5591-5b3d-4f60-8e2a-1d9c6b4f7e05",    "runNodeCount": 1,    "title": "Autumn campaign"  },  "workflow": {    "createdAt": "2026-10-21T12:00:00.000Z",    "id": "a5614527-5b3d-4f60-8e2a-1d9c6b4f7e05",    "name": "Autumn campaign",    "nodeCount": 1,    "updatedAt": "2026-10-21T12:00:00.000Z",    "version": 3  }}