Update workflow
Update name, description, the graph, or reassign to a different account. The graph can only be modified while the workflow is draft or paused. Account swaps re-validate the graph against the new platform (so e.g. moving from WhatsApp to Facebook surfaces a start_call node as an error instead of silently saving an unrunnable graph).
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
Reassign the workflow to a different SocialAccount. platform and profileId are derived server-side from the new account (the client never sends them directly). The account must belong to the caller's workspace and be on a workflow-supported platform (whatsapp, instagram, facebook, telegram, twitter, bluesky, reddit). Changing this triggers a graph revalidation against the new platform.
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"
}
}{
"error": "Unauthorized"
}{
"error": "Not found"
}