workflows
Get a specific workflow version
Returns the full snapshot for a single historical version, including the graph.
AuthorizationBearer <token>
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
workflowIdstring
versioninteger
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.getWorkflowVersion({ path: { workflowId: 'workflow_abc123', version: 0, },});console.log(data);{
"success": true,
"version": {
"version": 0,
"name": "string",
"description": "string",
"entryNodeId": "string",
"nodes": [
{
"id": "string",
"type": "trigger",
"config": {},
"position": {
"x": 0,
"y": 0
}
}
],
"edges": [
{
"id": "string",
"source": "string",
"target": "string",
"sourceHandle": "string"
}
],
"platform": "string",
"accountId": "string",
"profileId": "string",
"createdBy": "string",
"createdByEmail": "string",
"restoredFromVersion": 0,
"createdAt": "2019-08-24T14:15:22Z"
}
}{
"error": "Unauthorized"
}{
"error": "Not found"
}Create workflow POST
Create a branching conversation workflow (draft) from a node/edge graph. Created in `draft` status; activate it to start matching inbound messages. The graph is validated structurally; completeness (a trigger node + reachable entry) is required at activation.
Get workflow with graph GET
Returns a workflow including its full node/edge graph and run stats.