The name of the workflow
Workflow API key
The stages of the workflow
import { buildClient } from '@datocms/cma-client-node';async function run() {const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });const workflowId = '439239';const workflow = await client.workflows.update(workflowId, {name: 'Approval by editors required',api_key: 'approval_by_editors',stages: [{id: 'waiting_for_review',name: 'Waiting for review',initial: true}]});console.log(workflow);}run();
{id: '439239',name: 'Approval by editors required',api_key: 'approval_by_editors',stages: [{id: 'waiting_for_review',name: 'Waiting for review',initial: true}]}