v1

latestOpenAPI 3.0.0Cognigy Proprietary License2026-07-2239524.1 MB
Nodes

Create a Node

Creates a new Node in a Flow.

post/v2.0/flows/{flowId}/chart/nodes

Path parameters

flowIdstring required

The unique identifier for the Flow.

Headers

Accept'application/json' | 'application/hal+json' | 'application/xml' | 'text/xml' | 'text/csv'

The Accept header specifies the media type that the client expects in the response. Available options: application/json, application/hal+json, application/xml, text/xml, text/csv. The default value is application/json.

Request body

typestring required

Type of the Node

extensionstring
labelstring

Replaces the default name of the Node displayed in the Flow Editor.

commentstring

Adds additional information about Nodes, for example, a specific of the Node.

isEntryPointboolean
isDisabledboolean
configobject
localeReferencestring
analyticsLabelstring
targetstring required

The ID of the previous or parent Node to which the current Node should be attached.

mode'append' | 'prepend' | 'appendChild' | 'prependChild' | 'insertChildAt' | 'insertAfter' | 'insertBefore' required
positionnumber

The desired position. Only used for insertChildAt.

Example request

{
  "type": "if",
  "extension": "@cognigy/basic-nodes",
  "label": "A new Node",
  "comment": "this is a very important node",
  "commentColor": "#ff8a80",
  "config": {
    "condition": {
      "type": "rule",
      "condition": "",
      "rule": {
        "left": "1",
        "operand": "gt",
        "right": "2"
      }
    }
  },
  "localeReference": "63bd8ebb648e6e739f1bbd82",
  "analyticsLabel": "condition",
  "mock": {
    "code": "console.log('Hello, world!');"
  },
  "target": "63c6c16a7e1ef09c81f6075d",
  "position": 42
}

Response

Returns ChartNode metadata object.

typestring

Type of the Node

extensionstring
labelstring

Replaces the default name of the Node displayed in the Flow Editor.

commentstring

Adds additional information about Nodes, for example, a specific of the Node.

isEntryPointboolean
isDisabledboolean
configobject
localeReferencestring
analyticsLabelstring
_idstring

Example response

{
  "type": "if",
  "extension": "@cognigy/basic-nodes",
  "label": "A new Node",
  "comment": "this is a very important node",
  "commentColor": "#ff8a80",
  "config": {
    "condition": {
      "type": "rule",
      "condition": "",
      "rule": {
        "left": "1",
        "operand": "gt",
        "right": "2"
      }
    }
  },
  "localeReference": "63bd8ebb648e6e739f1bbd82",
  "analyticsLabel": "condition",
  "mock": {
    "code": "console.log('Hello, world!');"
  }
}