Update a Workflow

Hand off to an LLM

Update a workflow. Updates create a new version.

The previous version remains addressable and immutable. Pending and running calls captured at the old version continue against it; new calls run against the new version.

Topology updates

To change the graph you must provide mainNodeName, nodes, AND edges together — partial topology updates are rejected. The full graph is replaced atomically.

Metadata-only updates

Omit all three fields to update only displayName, tags, or name while keeping the topology of the current version.

Reverting

To roll back, fetch the desired prior version and resubmit its mainNodeName/nodes/edges as a new update. Versions themselves are immutable — there is no "pin to version N" operation at the workflow level (use nodes[].function.versionNum to pin individual functions).

PATCH
/v3/workflows/{workflowName}
x-api-key<token>

Authenticate using API Key in request header

In: header

Path Parameters

workflowName*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://api.bem.ai/v3/workflows/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "workflow": {
    "id": "string",
    "name": "string",
    "versionNum": 0,
    "displayName": "string",
    "emailAddress": "string",
    "tags": [
      "string"
    ],
    "mainNodeName": "string",
    "nodes": [
      {
        "name": "string",
        "function": {
          "id": "string",
          "name": "string",
          "versionNum": 0
        },
        "metadata": {}
      }
    ],
    "edges": [
      {
        "sourceNodeName": "string",
        "destinationName": "string",
        "destinationNodeName": "string",
        "metadata": {}
      }
    ],
    "connectors": [
      {
        "connectorID": "string",
        "name": "string",
        "type": "paragon",
        "paragon": {
          "integration": "string",
          "configuration": {},
          "syncID": "string"
        }
      }
    ],
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "audit": {
      "workflowCreatedBy": {
        "userActionID": "string",
        "userID": "string",
        "userEmail": "string",
        "apiKeyName": "string",
        "emailAddress": "string",
        "createdAt": "2019-08-24T14:15:22Z"
      },
      "workflowLastUpdatedBy": {
        "userActionID": "string",
        "userID": "string",
        "userEmail": "string",
        "apiKeyName": "string",
        "emailAddress": "string",
        "createdAt": "2019-08-24T14:15:22Z"
      },
      "versionCreatedBy": {
        "userActionID": "string",
        "userID": "string",
        "userEmail": "string",
        "apiKeyName": "string",
        "emailAddress": "string",
        "createdAt": "2019-08-24T14:15:22Z"
      }
    }
  },
  "error": "string",
  "connectorErrors": [
    {
      "connectorID": "string",
      "name": "string",
      "operation": "create",
      "message": "string",
      "code": "string"
    }
  ]
}

See also