API referenceWorkflows
Restore a version
POST
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.
apiKeyheader
x-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.
revisionId*stringLength
1 <= length <= 128application/json- body
version*integerRange
1 <= valueThe workflow's summary, with its new version, and the new version.
application/json- response
revision*workflow*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 }}