Restore a previous workflow version
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.
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
Response Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.workflows.restoreWorkflowVersion({ path: { workflowId: 'workflow_abc123', version: 0, },});console.log(data);{
"success": true,
"workflow": {
"id": "string",
"name": "string",
"description": "string",
"status": "string",
"entryNodeId": "string",
"nodeCount": 0,
"updatedAt": "2019-08-24T14:15:22Z"
},
"restoredFromVersion": 0
}{
"error": "Unauthorized"
}{
"error": "Not found"
}Pause workflow POST
Stop matching new inbound messages. In-flight executions continue to completion. Idempotent.
Manually start a workflow run POST
Kick off a run without waiting for an inbound message (useful for testing). Target an existing conversation by `conversationId`, or — WhatsApp only — a phone number via `to` (a conversation is found or created). `text` seeds the run's `lastMessage` variable. The graph must be runnable.