The name of the workflow
The stages of the workflow
const SiteClient = require('datocms-client').SiteClient;const client = new SiteClient('YOUR-API-TOKEN');client.workflow.create({id: 'approval_by_editors',name: 'Approval by editors required',stages: [{id: 'waiting_for_review',name: 'Waiting for review',initial: true}]}).then((workflow) => {console.log(workflow);}).catch((error) => {console.error(error);});
> node example.js{"id": "approval_by_editors","name": "Approval by editors required","stages": [{"id": "waiting_for_review","name": "Waiting for review","initial": true}]}