workflows
Update workflow
Update name, description, or the graph. The graph can only be modified while the workflow is draft or paused.
AuthorizationBearer <token>
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
workflowIdstring
name?string
description?string
nodes?
edges?
entryNodeId?string
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.updateWorkflow({ path: { workflowId: 'workflow_abc123', }, body: { name: 'Example', description: 'Hello, world!', nodes: [ { id: 'abc123', type: 'trigger', }, ], },});console.log(data);{
"success": true,
"workflow": {
"id": "string",
"name": "string",
"description": "string",
"status": "string",
"entryNodeId": "string",
"nodeCount": 0,
"updatedAt": "2019-08-24T14:15:22Z"
}
}Empty
{
"error": "Unauthorized"
}{
"error": "Not found"
}