Show examples in:
    Update a workflow

    Body Parameters

    name  Optional  string  Example: "Approval by editors required"

    The name of the workflow

    api_key  Optional  string  Example: "approval_by_editors"

    Workflow API key

    stages  Optional  Array<object>  Example: [{"id":"waiting_for_review","name":"Waiting for review","initial":true}]

    The stages of the workflow

    Returns

    Returns a workflow resource object.

    Examples

    Example Basic example
    import { buildClient } from '@datocms/cma-client-node';
    async function run() {
    const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });
    const workflowId = 'uJzC2b6YQg-DW2A5edpQYQ';
    const workflow = await client.workflows.update(workflowId, {});
    console.log(workflow);
    }
    run();