Restore a 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 not be active: pause it first, then restore. The returned workflow carries restoredFromVersion so the UI can surface which version was rolled back to.
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
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}Get a specific workflow version
Returns the full snapshot for a single historical version, including the graph.
Start an API-triggered workflow
Starts a run of an active workflow whose trigger type is `api_call`. Pass exactly one target: `conversationId` (a conversation on the workflow's account), `contactId` (resolved to that contact's conversation on the workflow's account), or `to` (WhatsApp workflows only: a phone number, whose conversation is found or created). `variables` are merged over the standard run variables, so each key is available as `{{key}}`.