> ## Documentation Index
> Fetch the complete documentation index at: https://www.voiceflow.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflows

API operations for workflows. Browse the routes below for parameters, request examples, and responses.

API version: Selected per operation

## List workflows

Returns a page of the environment's workflows with the IDs the other workflow operations take. A workflow is a graph of blocks and steps the agent can run; send `nextCursor` as `cursor` for the next page.

### Endpoint

```http
GET /v1/stable/workflow
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

#### `folderID`

Optional · string

Only the workflows in this folder.

```json
{
  "description": "Only the workflows in this folder.",
  "type": "string"
}
```

#### `cursor`

Optional · string

The nextCursor of the previous page. Leave it out for the first page. Pages are counted on the workflows as they are at each call, so an edit between pages can repeat or skip a workflow.

```json
{
  "description": "The nextCursor of the previous page. Leave it out for the first page. Pages are counted on the workflows as they are at each call, so an edit between pages can repeat or skip a workflow.",
  "type": "string",
  "pattern": "^\\d+$"
}
```

#### `limit`

Optional · integer

The most workflows to return. Defaults to 50.

```json
{
  "description": "The most workflows to return. Defaults to 50.",
  "type": "integer",
  "minimum": 1,
  "maximum": 50
}
```

### Responses

#### 200

Returns a page of workflows with each one's ID, name, description, folder and last update time. When more follow, `nextCursor` holds the value to send as `cursor` for the next page.

Schema:

```json
{
  "$ref": "#/components/schemas/StableWorkflowReadListResponse"
}
```

Example:

```json
{
  "workflows": [
    {
      "id": "<string>",
      "name": "<string>",
      "description": "<string>",
      "folderID": "<string>",
      "updatedAt": "2026-09-10T00:00:00.000Z"
    }
  ],
  "nextCursor": "<string>"
}
```

### Request examples

#### cURL

```bash
curl --request GET \
  --url 'https://realtime-api.voiceflow.com/v1/stable/workflow?projectID=<projectID>&environmentAlias=<environmentAlias>&folderID=<folderID>&cursor=<cursor>&limit=<limit>' \
  --header 'Authorization: Bearer <token>'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/workflow?projectID=<projectID>&environmentAlias=<environmentAlias>&folderID=<folderID>&cursor=<cursor>&limit=<limit>', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer <token>',
  },
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.get(
    'https://realtime-api.voiceflow.com/v1/stable/workflow?projectID=<projectID>&environmentAlias=<environmentAlias>&folderID=<folderID>&cursor=<cursor>&limit=<limit>',
    headers={'Authorization': 'Bearer <token>'},
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf workflow list --project-id <projectID> --environment-alias <environmentAlias> --folder-id <folderID> --cursor <cursor> --limit <limit>
```


## Create workflow

Builds a whole workflow in one request, including its blocks, steps, branches and the links between blocks. The new workflow is not reachable by the agent until you add it to the agent's workflows and write a routing rule for it.

### Endpoint

```http
POST /v1/stable/workflow
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableWorkflowCreateRequest"
      }
    }
  }
}
```

### Responses

#### 201

Returns the new workflow's ID, its entry step, a map from each key you sent to the ID the server created, and any warnings or unresolved references.

Schema:

```json
{
  "$ref": "#/components/schemas/StableWorkflowCreateResponse"
}
```

Example:

```json
{
  "workflow": {
    "id": "<string>"
  },
  "entry": {
    "stepID": "<string>",
    "next": "<string>"
  },
  "ids": {},
  "warnings": [
    {
      "code": "BRANCH_NOT_LAST",
      "detail": "<string>"
    }
  ],
  "unresolvedReferences": [
    {
      "path": "<string>",
      "token": "<string>",
      "reason": "unknown"
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/workflow?projectID=<projectID>&environmentAlias=<environmentAlias>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "description": "<string>",
  "folderID": "<string>",
  "entry": "<string>",
  "blocks": [
    {
      "key": "<string>",
      "name": "<string>",
      "color": "<string>",
      "steps": [
        "<StableWorkflowStepInput>"
      ]
    }
  ]
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/workflow?projectID=<projectID>&environmentAlias=<environmentAlias>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "name": "<string>",
    "description": "<string>",
    "folderID": "<string>",
    "entry": "<string>",
    "blocks": [
      {
        "key": "<string>",
        "name": "<string>",
        "color": "<string>",
        "steps": [
          "<StableWorkflowStepInput>"
        ]
      }
    ]
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/workflow?projectID=<projectID>&environmentAlias=<environmentAlias>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "name": "<string>",
      "description": "<string>",
      "folderID": "<string>",
      "entry": "<string>",
      "blocks": [
        {
          "key": "<string>",
          "name": "<string>",
          "color": "<string>",
          "steps": [
            "<StableWorkflowStepInput>"
          ]
        }
      ]
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf workflow create --project-id <projectID> --environment-alias <environmentAlias> <<'JSON'
{
  "name": "<string>",
  "description": "<string>",
  "folderID": "<string>",
  "entry": "<string>",
  "blocks": [
    {
      "key": "<string>",
      "name": "<string>",
      "color": "<string>",
      "steps": [
        "<StableWorkflowStepInput>"
      ]
    }
  ]
}
JSON
```


## Get workflow

Reads a workflow as blocks of steps, each with its kind, content and links. Messages and prompts appear as IDs, not their text. Read it before any edit to get the block and step IDs.

### Endpoint

```http
GET /v1/stable/workflow/{workflowID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workflowID`

Required · string

The ID of the workflow to operate on.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

#### `cursor`

Optional · string

The truncated.nextCursor of the previous page. Leave it out for the first page. Pages are counted on the workflow as it is at each call, so an edit between pages can repeat or skip a block.

```json
{
  "description": "The truncated.nextCursor of the previous page. Leave it out for the first page. Pages are counted on the workflow as it is at each call, so an edit between pages can repeat or skip a block.",
  "type": "string",
  "pattern": "^\\d+$"
}
```

### Responses

#### 200

Returns the workflow's name, description and counts, then a page of its blocks. When there are more blocks, `truncated.nextCursor` holds the value to send as `cursor` for the next page.

Schema:

```json
{
  "$ref": "#/components/schemas/StableWorkflowReadResponse"
}
```

Example:

```json
{
  "workflow": {
    "id": "<string>",
    "name": "<string>",
    "description": "<string>",
    "counts": {
      "blocks": 0,
      "steps": 0,
      "unreachableBlocks": 0,
      "danglingLinks": 0
    }
  },
  "entry": {
    "stepID": "<string>",
    "name": "<string>",
    "next": "<string>",
    "actions": [
      {
        "id": "<string>",
        "kind": "<StableWorkflowStepKind>",
        "content": "<StableWorkflowStepContent>",
        "warnings": [
          "<StableWorkflowDiagnostic>"
        ]
      }
    ]
  },
  "blocks": [
    {
      "id": "<string>",
      "name": "<string>",
      "inboundFrom": [
        "<StableWorkflowInbound>"
      ],
      "steps": [
        "<StableWorkflowStep>"
      ]
    }
  ],
  "orphanSteps": [
    {
      "id": "<string>",
      "kind": "message",
      "exitClass": "sequential",
      "content": "<StableWorkflowStepMessageContent>",
      "fallsThroughTo": "<string>",
      "suppressedPorts": [
        "<string>"
      ],
      "links": [
        "<StableWorkflowLink>"
      ],
      "reconciledPorts": "<StableWorkflowReconciledPorts>",
      "warnings": [
        "<StableWorkflowDiagnostic>"
      ]
    }
  ],
  "warnings": [
    {
      "code": "BRANCH_NOT_LAST",
      "detail": "<string>"
    }
  ],
  "truncated": {
    "blocks": 0,
    "returned": 0,
    "nextCursor": "<string>"
  }
}
```

### Request examples

#### cURL

```bash
curl --request GET \
  --url 'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>?projectID=<projectID>&environmentAlias=<environmentAlias>&cursor=<cursor>' \
  --header 'Authorization: Bearer <token>'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>?projectID=<projectID>&environmentAlias=<environmentAlias>&cursor=<cursor>', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer <token>',
  },
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.get(
    'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>?projectID=<projectID>&environmentAlias=<environmentAlias>&cursor=<cursor>',
    headers={'Authorization': 'Bearer <token>'},
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf workflow get --workflow-id <workflowID> --project-id <projectID> --environment-alias <environmentAlias> --cursor <cursor>
```


## Update workflow

Changes a workflow's name, description or folder. It does not edit blocks or steps; use the block and step operations for that.

### Endpoint

```http
PATCH /v1/stable/workflow/{workflowID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workflowID`

Required · string

The ID of the workflow to operate on.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableWorkflowUpdateRequest"
      }
    }
  }
}
```

### Responses

#### 200

Confirms the workflow was updated. Only a confirmation message comes back, so refetch the workflow to see its new values.

Schema:

```json
{
  "$ref": "#/components/schemas/StableUpdateResponse"
}
```

Example:

```json
{
  "message": "<string>"
}
```

### Request examples

#### cURL

```bash
curl --request PATCH \
  --url 'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>?projectID=<projectID>&environmentAlias=<environmentAlias>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "description": "<string>",
  "folderID": "<string>"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>?projectID=<projectID>&environmentAlias=<environmentAlias>', {
  method: 'PATCH',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "name": "<string>",
    "description": "<string>",
    "folderID": "<string>"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.patch(
    'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>?projectID=<projectID>&environmentAlias=<environmentAlias>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "name": "<string>",
      "description": "<string>",
      "folderID": "<string>"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf workflow update --workflow-id <workflowID> --project-id <projectID> --environment-alias <environmentAlias> <<'JSON'
{
  "name": "<string>",
  "description": "<string>",
  "folderID": "<string>"
}
JSON
```


## Delete workflow

Removes the workflow from the environment. The agent's routing can still name it, so check the agent's rules. The response carries only a confirmation message, so refetch the workflows to see what is left.

### Endpoint

```http
DELETE /v1/stable/workflow/{workflowID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workflowID`

Required · string

The ID of the workflow to operate on.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

### Responses

#### 200

Confirms the workflow was deleted. Only a confirmation message comes back.

Schema:

```json
{
  "$ref": "#/components/schemas/StableDeleteResponse"
}
```

Example:

```json
{
  "message": "<string>"
}
```

### Request examples

#### cURL

```bash
curl --request DELETE \
  --url 'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>?projectID=<projectID>&environmentAlias=<environmentAlias>' \
  --header 'Authorization: Bearer <token>'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>?projectID=<projectID>&environmentAlias=<environmentAlias>', {
  method: 'DELETE',
  headers: {
    Authorization: 'Bearer <token>',
  },
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.delete(
    'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>?projectID=<projectID>&environmentAlias=<environmentAlias>',
    headers={'Authorization': 'Bearer <token>'},
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf workflow delete --workflow-id <workflowID> --project-id <projectID> --environment-alias <environmentAlias>
```


## Get workflow step

Reads a single step without fetching the whole workflow. An action ID from an exit's actions reads the same way.

### Endpoint

```http
GET /v1/stable/workflow/{workflowID}/step/{stepID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workflowID`

Required · string

The ID of the workflow to operate on.

```json
{
  "type": "string"
}
```

#### `stepID`

Required · string

The ID of the step to operate on.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

### Responses

#### 200

Returns the step's kind, content, exit class and links, along with the block it is in.

Schema:

```json
{
  "$ref": "#/components/schemas/StableWorkflowStepReadResponse"
}
```

Example:

```json
{
  "workflowID": "<string>",
  "blockID": "<string>",
  "step": {
    "id": "<string>",
    "kind": "message",
    "exitClass": "sequential",
    "content": {
      "responseType": "message",
      "messageID": "<string>",
      "waitForUserResponse": true
    },
    "fallsThroughTo": "<string>",
    "suppressedPorts": [
      "<string>"
    ],
    "links": [
      {
        "port": "<string>",
        "label": "<string>",
        "to": "<string>",
        "actions": [
          "<StableWorkflowPortAction>"
        ],
        "overridden": true,
        "effectiveTo": "<string>"
      }
    ],
    "reconciledPorts": {
      "added": [
        "<string>"
      ],
      "removed": [
        "<string>"
      ]
    },
    "warnings": [
      {
        "code": "<StableWorkflowDiagnosticCode>",
        "detail": "<string>"
      }
    ]
  },
  "portAction": {
    "stepID": "<string>",
    "port": "<string>",
    "index": 0
  }
}
```

### Request examples

#### cURL

```bash
curl --request GET \
  --url 'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>?projectID=<projectID>&environmentAlias=<environmentAlias>' \
  --header 'Authorization: Bearer <token>'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>?projectID=<projectID>&environmentAlias=<environmentAlias>', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer <token>',
  },
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.get(
    'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>?projectID=<projectID>&environmentAlias=<environmentAlias>',
    headers={'Authorization': 'Bearer <token>'},
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf workflow get-step --workflow-id <workflowID> --step-id <stepID> --project-id <projectID> --environment-alias <environmentAlias>
```


## Update workflow step

Edits a step's settings, or points it at a different message or prompt. To change the words a step says, update its message or prompt instead. Branches have their own operations.

### Endpoint

```http
PATCH /v1/stable/workflow/{workflowID}/step/{stepID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workflowID`

Required · string

The ID of the workflow to operate on.

```json
{
  "type": "string"
}
```

#### `stepID`

Required · string

The ID of the step to operate on.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableWorkflowStepUpdateRequest"
      }
    }
  }
}
```

### Responses

#### 200

Confirms the step was updated. Returns what was written, the block that holds the step, and the step with its new content.

Schema:

```json
{
  "$ref": "#/components/schemas/StableWorkflowStepWriteResponse"
}
```

Example:

```json
{
  "message": "<string>",
  "blockID": "<string>",
  "step": {
    "id": "<string>",
    "kind": "message",
    "exitClass": "sequential",
    "content": {
      "responseType": "message",
      "messageID": "<string>",
      "waitForUserResponse": true
    },
    "fallsThroughTo": "<string>",
    "suppressedPorts": [
      "<string>"
    ],
    "links": [
      {
        "port": "<string>",
        "label": "<string>",
        "to": "<string>",
        "actions": [
          "<StableWorkflowPortAction>"
        ],
        "overridden": true,
        "effectiveTo": "<string>"
      }
    ],
    "reconciledPorts": {
      "added": [
        "<string>"
      ],
      "removed": [
        "<string>"
      ]
    },
    "warnings": [
      {
        "code": "<StableWorkflowDiagnosticCode>",
        "detail": "<string>"
      }
    ]
  },
  "portAction": {
    "stepID": "<string>",
    "port": "<string>",
    "index": 0
  },
  "ids": {},
  "clearedLinks": [
    {
      "stepID": "<string>",
      "port": "<string>",
      "to": "<string>",
      "actions": [
        "<string>"
      ]
    }
  ],
  "unresolvedReferences": [
    {
      "path": "<string>",
      "token": "<string>",
      "reason": "unknown"
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request PATCH \
  --url 'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>?projectID=<projectID>&environmentAlias=<environmentAlias>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "kind": "message",
  "content": {
    "responseType": "message",
    "messageID": "<string>",
    "promptID": "<string>",
    "waitForUserResponse": true
  }
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>?projectID=<projectID>&environmentAlias=<environmentAlias>', {
  method: 'PATCH',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "kind": "message",
    "content": {
      "responseType": "message",
      "messageID": "<string>",
      "promptID": "<string>",
      "waitForUserResponse": true
    }
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.patch(
    'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>?projectID=<projectID>&environmentAlias=<environmentAlias>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "kind": "message",
      "content": {
        "responseType": "message",
        "messageID": "<string>",
        "promptID": "<string>",
        "waitForUserResponse": True
      }
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf workflow update-step --workflow-id <workflowID> --step-id <stepID> --project-id <projectID> --environment-alias <environmentAlias> <<'JSON'
{
  "kind": "message",
  "content": {
    "responseType": "message",
    "messageID": "<string>",
    "promptID": "<string>",
    "waitForUserResponse": true
  }
}
JSON
```


## Delete workflow step

Removes one step, or one action from an exit when you pass an action ID; it is removed from the block it sat in. Send `expectedSteps` as your last read returned them. The response lists the links that were cleared and the links that now run.

### Endpoint

```http
DELETE /v1/stable/workflow/{workflowID}/step/{stepID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workflowID`

Required · string

The ID of the workflow to operate on.

```json
{
  "type": "string"
}
```

#### `stepID`

Required · string

The ID of the step to operate on.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

#### `expectedSteps`

Required · string[]

The block's step IDs exactly as your last read returned them, in order, as an array: ["m1", "e1"]. For an action, the action IDs of its exit. If they changed, nothing is written.

```json
{
  "description": "The block's step IDs exactly as your last read returned them, in order, as an array: [\"m1\", \"e1\"]. For an action, the action IDs of its exit. If they changed, nothing is written.",
  "type": "array",
  "items": {
    "type": "string"
  }
}
```

### Responses

#### 200

Confirms the step was deleted. Returns what was removed, the links that were cleared, and the links that now run.

Schema:

```json
{
  "$ref": "#/components/schemas/StableWorkflowRemovalResponse"
}
```

Example:

```json
{
  "message": "<string>",
  "removed": {
    "blocks": [
      "<string>"
    ],
    "steps": [
      "<string>"
    ]
  },
  "clearedLinks": [
    {
      "stepID": "<string>",
      "port": "<string>"
    }
  ],
  "linksNowRunning": [
    {
      "stepID": "<string>",
      "port": "<string>",
      "to": "<string>"
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request DELETE \
  --url 'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>?projectID=<projectID>&environmentAlias=<environmentAlias>&expectedSteps=<expectedSteps>' \
  --header 'Authorization: Bearer <token>'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>?projectID=<projectID>&environmentAlias=<environmentAlias>&expectedSteps=<expectedSteps>', {
  method: 'DELETE',
  headers: {
    Authorization: 'Bearer <token>',
  },
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.delete(
    'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>?projectID=<projectID>&environmentAlias=<environmentAlias>&expectedSteps=<expectedSteps>',
    headers={'Authorization': 'Bearer <token>'},
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf workflow delete-step --workflow-id <workflowID> --step-id <stepID> --project-id <projectID> --environment-alias <environmentAlias> --expected-steps <expectedSteps>
```


## Get raw workflow

Returns the workflow's canvas nodes as they are stored, with real coordinates, as a map keyed by node ID. Pass blockIDs to narrow the read to some blocks; it is larger than the standard workflow read, so use it only when that read cannot answer.

### Endpoint

```http
GET /v1/stable/workflow/{workflowID}/raw
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workflowID`

Required · string

The ID of the workflow to read.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

#### `blockIDs`

Optional · string[]

Read only these blocks, or the Start step ID, with their steps and the actions on their exits, as an array: ["blk_1", "blk_2"]. Leave it out to read every node.

```json
{
  "description": "Read only these blocks, or the Start step ID, with their steps and the actions on their exits, as an array: [\"blk_1\", \"blk_2\"]. Leave it out to read every node.",
  "minItems": 1,
  "maxItems": 50,
  "type": "array",
  "items": {
    "type": "string"
  }
}
```

### Responses

#### 200

Returns the workflow's ID, name and canvas ID, the stored nodes by ID with rich text rendered as strings, and any requested block IDs that matched no block.

Schema:

```json
{
  "$ref": "#/components/schemas/StableWorkflowRawReadResponse"
}
```

Example:

```json
{
  "workflow": {
    "id": "<string>",
    "name": "<string>",
    "diagramID": "<string>"
  },
  "nodes": {},
  "missingBlockIDs": [
    "<string>"
  ]
}
```

### Request examples

#### cURL

```bash
curl --request GET \
  --url 'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/raw?projectID=<projectID>&environmentAlias=<environmentAlias>&blockIDs=<blockIDs>' \
  --header 'Authorization: Bearer <token>'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/raw?projectID=<projectID>&environmentAlias=<environmentAlias>&blockIDs=<blockIDs>', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer <token>',
  },
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.get(
    'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/raw?projectID=<projectID>&environmentAlias=<environmentAlias>&blockIDs=<blockIDs>',
    headers={'Authorization': 'Bearer <token>'},
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf workflow get-raw --workflow-id <workflowID> --project-id <projectID> --environment-alias <environmentAlias> --block-ids <blockIDs>
```


## Duplicate workflow

Copies a workflow under the name you give. The copy gets its own copies of the messages, prompts, playbooks and Operator agents its steps use, while block and step IDs stay the same.

### Endpoint

```http
POST /v1/stable/workflow/{workflowID}/duplicate
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workflowID`

Required · string

The ID of the workflow to copy.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableWorkflowDuplicateRequest"
      }
    }
  }
}
```

### Responses

#### 201

Returns a message, the new workflow's ID and name, and maps from each original message, prompt, playbook and Operator agent ID to the ID of its copy.

Schema:

```json
{
  "$ref": "#/components/schemas/StableWorkflowDuplicateResponse"
}
```

Example:

```json
{
  "message": "<string>",
  "workflow": {
    "id": "<string>",
    "name": "<string>"
  },
  "ids": {
    "messages": {},
    "prompts": {},
    "playbooks": {},
    "operatorAgents": {}
  }
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/duplicate?projectID=<projectID>&environmentAlias=<environmentAlias>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/duplicate?projectID=<projectID>&environmentAlias=<environmentAlias>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "name": "<string>"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/duplicate?projectID=<projectID>&environmentAlias=<environmentAlias>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "name": "<string>"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf workflow duplicate --workflow-id <workflowID> --project-id <projectID> --environment-alias <environmentAlias> <<'JSON'
{
  "name": "<string>"
}
JSON
```


## Unlink a port

Disconnects an exit so the path stops there. No step or block is deleted, and any actions on the exit stay.

### Endpoint

```http
DELETE /v1/stable/workflow/{workflowID}/step/{stepID}/link/{portKey}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workflowID`

Required · string

The ID of the workflow to operate on.

```json
{
  "type": "string"
}
```

#### `stepID`

Required · string

The ID of the step to operate on.

```json
{
  "type": "string"
}
```

#### `portKey`

Required · string

The port to operate on: next, fail, else, no-reply, or the ID of a branch.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

### Responses

#### 200

Confirms the port now leads nowhere. Returns the link with its step and port; a port that already led nowhere is reported as such and nothing is written.

Schema:

```json
{
  "$ref": "#/components/schemas/StableWorkflowLinkResponse"
}
```

Example:

```json
{
  "message": "<string>",
  "link": {
    "stepID": "<string>",
    "port": "<string>",
    "to": "<string>"
  }
}
```

### Request examples

#### cURL

```bash
curl --request DELETE \
  --url 'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>/link/<portKey>?projectID=<projectID>&environmentAlias=<environmentAlias>' \
  --header 'Authorization: Bearer <token>'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>/link/<portKey>?projectID=<projectID>&environmentAlias=<environmentAlias>', {
  method: 'DELETE',
  headers: {
    Authorization: 'Bearer <token>',
  },
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.delete(
    'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>/link/<portKey>?projectID=<projectID>&environmentAlias=<environmentAlias>',
    headers={'Authorization': 'Bearer <token>'},
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf workflow unlink --workflow-id <workflowID> --step-id <stepID> --port-key <portKey> --project-id <projectID> --environment-alias <environmentAlias>
```


## Link a port

Wires an exit of a step to a block, replacing whatever the port led to before. If other edits keep changing the workflow while the call saves, it returns 409 and writes nothing; read the workflow again and resend.

### Endpoint

```http
PUT /v2/stable/workflow/{workflowID}/step/{stepID}/link/{portKey}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workflowID`

Required · string

The ID of the workflow to operate on.

```json
{
  "type": "string"
}
```

#### `stepID`

Required · string

The ID of the step to operate on.

```json
{
  "type": "string"
}
```

#### `portKey`

Required · string

The port to operate on: next, fail, else, no-reply, or the ID of a branch.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableWorkflowLinkRequest"
      }
    }
  }
}
```

### Responses

#### 200

Confirms the new link. Returns a message and the link; when a link was replaced, `replacedLink` and the message name the block the port led to before.

Schema:

```json
{
  "$ref": "#/components/schemas/StableWorkflowLinkResponseV2"
}
```

Example:

```json
{
  "message": "<string>",
  "link": {
    "stepID": "<string>",
    "port": "<string>",
    "to": "<string>"
  },
  "replacedLink": {
    "stepID": "<string>",
    "port": "<string>",
    "to": "<string>"
  }
}
```

### Request examples

#### cURL

```bash
curl --request PUT \
  --url 'https://realtime-api.voiceflow.com/v2/stable/workflow/<workflowID>/step/<stepID>/link/<portKey>?projectID=<projectID>&environmentAlias=<environmentAlias>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "toBlockID": "<string>"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v2/stable/workflow/<workflowID>/step/<stepID>/link/<portKey>?projectID=<projectID>&environmentAlias=<environmentAlias>', {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "toBlockID": "<string>"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.put(
    'https://realtime-api.voiceflow.com/v2/stable/workflow/<workflowID>/step/<stepID>/link/<portKey>?projectID=<projectID>&environmentAlias=<environmentAlias>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "toBlockID": "<string>"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf workflow link --workflow-id <workflowID> --step-id <stepID> --port-key <portKey> --project-id <projectID> --environment-alias <environmentAlias> <<'JSON'
{
  "toBlockID": "<string>"
}
JSON
```


## Link many ports

Points up to 50 ports at blocks in one write. Every link is checked before anything is saved, and they save together; a port that led elsewhere now leads to the new block and keeps its actions.

### Endpoint

```http
PUT /v1/stable/workflow/{workflowID}/links
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workflowID`

Required · string

The ID of the workflow that holds the ports.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableWorkflowLinkManyRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns a message and, for each port in the order sent, the block it led to before.

Schema:

```json
{
  "$ref": "#/components/schemas/StableWorkflowLinkManyResponse"
}
```

Example:

```json
{
  "message": "<string>",
  "linked": [
    {
      "stepID": "<string>",
      "port": "<string>",
      "to": "<string>",
      "replaced": "<string>"
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request PUT \
  --url 'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/links?projectID=<projectID>&environmentAlias=<environmentAlias>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "links": [
    {
      "stepID": "<string>",
      "port": "<string>",
      "toBlockID": "<string>"
    }
  ]
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/links?projectID=<projectID>&environmentAlias=<environmentAlias>', {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "links": [
      {
        "stepID": "<string>",
        "port": "<string>",
        "toBlockID": "<string>"
      }
    ]
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.put(
    'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/links?projectID=<projectID>&environmentAlias=<environmentAlias>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "links": [
        {
          "stepID": "<string>",
          "port": "<string>",
          "toBlockID": "<string>"
        }
      ]
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf workflow link-many --workflow-id <workflowID> --project-id <projectID> --environment-alias <environmentAlias> <<'JSON'
{
  "links": [
    {
      "stepID": "<string>",
      "port": "<string>",
      "toBlockID": "<string>"
    }
  ]
}
JSON
```


## Create block

Adds a block of 1 to 20 steps to an existing workflow, placed next to `placement.afterBlockID`. When you send `from`, the call also links that port to the new block and replaces the block that port led to. If other edits keep changing the workflow while the call saves, it returns 409 and writes nothing.

### Endpoint

```http
POST /v2/stable/workflow/{workflowID}/block
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workflowID`

Required · string

The ID of the workflow to operate on.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableWorkflowBlockCreateRequest"
      }
    }
  }
}
```

### Responses

#### 201

Returns a message, the new block with its steps, a map from each key you sent to the ID the server created, and any unresolved references. When a link was replaced, `replacedLink` names the block the port led to before.

Schema:

```json
{
  "$ref": "#/components/schemas/StableWorkflowBlockWriteResponseV2"
}
```

Example:

```json
{
  "message": "<string>",
  "block": {
    "id": "<string>",
    "name": "<string>",
    "inboundFrom": [
      {
        "stepID": "<string>",
        "port": "<string>"
      }
    ],
    "steps": [
      {
        "id": "<string>",
        "kind": "<StableWorkflowStepKind>",
        "exitClass": "<StableWorkflowExitClass>",
        "content": "<StableWorkflowStepContent>",
        "fallsThroughTo": "<string>",
        "suppressedPorts": [
          "<string>"
        ],
        "links": [
          "<StableWorkflowLink>"
        ],
        "reconciledPorts": "<StableWorkflowReconciledPorts>",
        "warnings": [
          "<StableWorkflowDiagnostic>"
        ]
      }
    ]
  },
  "ids": {},
  "unresolvedReferences": [
    {
      "path": "<string>",
      "token": "<string>",
      "reason": "unknown"
    }
  ],
  "replacedLink": {
    "stepID": "<string>",
    "port": "<string>",
    "to": "<string>"
  }
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v2/stable/workflow/<workflowID>/block?projectID=<projectID>&environmentAlias=<environmentAlias>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "color": "<string>",
  "placement": {
    "afterBlockID": "<string>"
  },
  "from": {
    "stepID": "<string>",
    "port": "<string>"
  },
  "steps": [
    {
      "kind": "message",
      "key": "<StableWorkflowSeedKey>",
      "content": "<StableWorkflowStepMessageContentInput>",
      "links": {}
    }
  ]
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v2/stable/workflow/<workflowID>/block?projectID=<projectID>&environmentAlias=<environmentAlias>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "name": "<string>",
    "color": "<string>",
    "placement": {
      "afterBlockID": "<string>"
    },
    "from": {
      "stepID": "<string>",
      "port": "<string>"
    },
    "steps": [
      {
        "kind": "message",
        "key": "<StableWorkflowSeedKey>",
        "content": "<StableWorkflowStepMessageContentInput>",
        "links": {}
      }
    ]
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v2/stable/workflow/<workflowID>/block?projectID=<projectID>&environmentAlias=<environmentAlias>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "name": "<string>",
      "color": "<string>",
      "placement": {
        "afterBlockID": "<string>"
      },
      "from": {
        "stepID": "<string>",
        "port": "<string>"
      },
      "steps": [
        {
          "kind": "message",
          "key": "<StableWorkflowSeedKey>",
          "content": "<StableWorkflowStepMessageContentInput>",
          "links": {}
        }
      ]
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf workflow create-block --workflow-id <workflowID> --project-id <projectID> --environment-alias <environmentAlias> <<'JSON'
{
  "name": "<string>",
  "color": "<string>",
  "placement": {
    "afterBlockID": "<string>"
  },
  "from": {
    "stepID": "<string>",
    "port": "<string>"
  },
  "steps": [
    {
      "kind": "message",
      "key": "<StableWorkflowSeedKey>",
      "content": "<StableWorkflowStepMessageContentInput>",
      "links": {}
    }
  ]
}
JSON
```


## Add workflow blocks

Creates up to 20 blocks with their steps in one write, links them to each other and to existing blocks, and can link existing ports to them. The server places the new blocks, so the request carries no coordinates.

### Endpoint

```http
POST /v1/stable/workflow/{workflowID}/blocks
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workflowID`

Required · string

The ID of the workflow to add the blocks to.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableWorkflowBlocksAddRequest"
      }
    }
  }
}
```

### Responses

#### 201

Returns a message, the new blocks, a map from each request key to the ID created for it, the existing ports that were linked with what each led to before, and any references that could not be resolved.

Schema:

```json
{
  "$ref": "#/components/schemas/StableWorkflowBlocksAddResponse"
}
```

Example:

```json
{
  "message": "<string>",
  "blocks": [
    {
      "id": "<string>",
      "name": "<string>",
      "inboundFrom": [
        "<StableWorkflowInbound>"
      ],
      "steps": [
        "<StableWorkflowStep>"
      ]
    }
  ],
  "ids": {},
  "linked": [
    {
      "stepID": "<string>",
      "port": "<string>",
      "to": "<string>",
      "replaced": "<string>"
    }
  ],
  "unresolvedReferences": [
    {
      "path": "<string>",
      "token": "<string>",
      "reason": "unknown"
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/blocks?projectID=<projectID>&environmentAlias=<environmentAlias>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "blocks": [
    {
      "key": "<string>",
      "name": "<string>",
      "color": "<string>",
      "steps": [
        "<StableWorkflowStepInput>"
      ]
    }
  ],
  "from": [
    {
      "stepID": "<string>",
      "port": "<string>",
      "to": "<StableWorkflowSeedKey>"
    }
  ],
  "placement": {
    "afterBlockID": "<string>"
  }
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/blocks?projectID=<projectID>&environmentAlias=<environmentAlias>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "blocks": [
      {
        "key": "<string>",
        "name": "<string>",
        "color": "<string>",
        "steps": [
          "<StableWorkflowStepInput>"
        ]
      }
    ],
    "from": [
      {
        "stepID": "<string>",
        "port": "<string>",
        "to": "<StableWorkflowSeedKey>"
      }
    ],
    "placement": {
      "afterBlockID": "<string>"
    }
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/blocks?projectID=<projectID>&environmentAlias=<environmentAlias>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "blocks": [
        {
          "key": "<string>",
          "name": "<string>",
          "color": "<string>",
          "steps": [
            "<StableWorkflowStepInput>"
          ]
        }
      ],
      "from": [
        {
          "stepID": "<string>",
          "port": "<string>",
          "to": "<StableWorkflowSeedKey>"
        }
      ],
      "placement": {
        "afterBlockID": "<string>"
      }
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf workflow add-blocks --workflow-id <workflowID> --project-id <projectID> --environment-alias <environmentAlias> <<'JSON'
{
  "blocks": [
    {
      "key": "<string>",
      "name": "<string>",
      "color": "<string>",
      "steps": [
        "<StableWorkflowStepInput>"
      ]
    }
  ],
  "from": [
    {
      "stepID": "<string>",
      "port": "<string>",
      "to": "<StableWorkflowSeedKey>"
    }
  ],
  "placement": {
    "afterBlockID": "<string>"
  }
}
JSON
```


## Update block

Changes a block's name or color. Its steps and links stay as they are.

### Endpoint

```http
PATCH /v1/stable/workflow/{workflowID}/block/{blockID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workflowID`

Required · string

The ID of the workflow to operate on.

```json
{
  "type": "string"
}
```

#### `blockID`

Required · string

The ID of the block to operate on.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableWorkflowBlockUpdateRequest"
      }
    }
  }
}
```

### Responses

#### 200

Confirms the block was updated. Only a confirmation message comes back, so refetch the workflow to see the new values.

Schema:

```json
{
  "$ref": "#/components/schemas/StableUpdateResponse"
}
```

Example:

```json
{
  "message": "<string>"
}
```

### Request examples

#### cURL

```bash
curl --request PATCH \
  --url 'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/block/<blockID>?projectID=<projectID>&environmentAlias=<environmentAlias>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "color": "<string>"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/block/<blockID>?projectID=<projectID>&environmentAlias=<environmentAlias>', {
  method: 'PATCH',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "name": "<string>",
    "color": "<string>"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.patch(
    'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/block/<blockID>?projectID=<projectID>&environmentAlias=<environmentAlias>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "name": "<string>",
      "color": "<string>"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf workflow update-block --workflow-id <workflowID> --block-id <blockID> --project-id <projectID> --environment-alias <environmentAlias> <<'JSON'
{
  "name": "<string>",
  "color": "<string>"
}
JSON
```


## Delete workflow block

Deletes a whole block, which is removed from the workflow with the links into it. Send `expectedSteps` as your last read returned them, so a changed block is not deleted by mistake. The response lists the links that were cleared and the links that now run.

### Endpoint

```http
DELETE /v1/stable/workflow/{workflowID}/block/{blockID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workflowID`

Required · string

The ID of the workflow to operate on.

```json
{
  "type": "string"
}
```

#### `blockID`

Required · string

The ID of the block to operate on.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

#### `expectedSteps`

Required · string[]

The block's step IDs exactly as your last read returned them, in order, as an array: ["m1", "e1"]. For an action, the action IDs of its exit. If they changed, nothing is written.

```json
{
  "description": "The block's step IDs exactly as your last read returned them, in order, as an array: [\"m1\", \"e1\"]. For an action, the action IDs of its exit. If they changed, nothing is written.",
  "type": "array",
  "items": {
    "type": "string"
  }
}
```

### Responses

#### 200

Confirms the block was deleted. Returns what was removed, the links into it that were cleared, and the links that now run.

Schema:

```json
{
  "$ref": "#/components/schemas/StableWorkflowRemovalResponse"
}
```

Example:

```json
{
  "message": "<string>",
  "removed": {
    "blocks": [
      "<string>"
    ],
    "steps": [
      "<string>"
    ]
  },
  "clearedLinks": [
    {
      "stepID": "<string>",
      "port": "<string>"
    }
  ],
  "linksNowRunning": [
    {
      "stepID": "<string>",
      "port": "<string>",
      "to": "<string>"
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request DELETE \
  --url 'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/block/<blockID>?projectID=<projectID>&environmentAlias=<environmentAlias>&expectedSteps=<expectedSteps>' \
  --header 'Authorization: Bearer <token>'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/block/<blockID>?projectID=<projectID>&environmentAlias=<environmentAlias>&expectedSteps=<expectedSteps>', {
  method: 'DELETE',
  headers: {
    Authorization: 'Bearer <token>',
  },
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.delete(
    'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/block/<blockID>?projectID=<projectID>&environmentAlias=<environmentAlias>&expectedSteps=<expectedSteps>',
    headers={'Authorization': 'Bearer <token>'},
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf workflow delete-block --workflow-id <workflowID> --block-id <blockID> --project-id <projectID> --environment-alias <environmentAlias> --expected-steps <expectedSteps>
```


## Arrange workflow blocks

Moves blocks into columns by their links, starting from the Start block, with blocks stacked by height. Pass blockIDs to move only those blocks; otherwise every block moves except the Start. Steps, links and names are not changed.

### Endpoint

```http
POST /v1/stable/workflow/{workflowID}/arrange
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workflowID`

Required · string

The ID of the workflow whose blocks to arrange.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableWorkflowArrangeRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns a message and the blocks that moved, each with its new position.

Schema:

```json
{
  "$ref": "#/components/schemas/StableWorkflowArrangeResponse"
}
```

Example:

```json
{
  "message": "<string>",
  "moved": [
    {
      "blockID": "<string>",
      "x": 0,
      "y": 0
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/arrange?projectID=<projectID>&environmentAlias=<environmentAlias>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "blockIDs": [
    "<string>"
  ]
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/arrange?projectID=<projectID>&environmentAlias=<environmentAlias>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "blockIDs": [
      "<string>"
    ]
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/arrange?projectID=<projectID>&environmentAlias=<environmentAlias>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "blockIDs": [
        "<string>"
      ]
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf workflow arrange-blocks --workflow-id <workflowID> --project-id <projectID> --environment-alias <environmentAlias> <<'JSON'
{
  "blockIDs": [
    "<string>"
  ]
}
JSON
```


## Split workflow block

Divides one block into two at a step you choose, so a link can enter at that step or a step can branch. Send `expectedSteps` as your last read returned them; if the block changed since then, the call returns 409 and writes nothing.

### Endpoint

```http
POST /v1/stable/workflow/{workflowID}/block/{blockID}/split
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workflowID`

Required · string

The ID of the workflow to operate on.

```json
{
  "type": "string"
}
```

#### `blockID`

Required · string

The ID of the block to operate on.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableWorkflowBlockSplitRequest"
      }
    }
  }
}
```

### Responses

#### 201

Returns both blocks, `head` for the part that keeps the original ID and `tail` for the new one. Link a port to the tail block next.

Schema:

```json
{
  "$ref": "#/components/schemas/StableWorkflowSplitResponse"
}
```

Example:

```json
{
  "head": {
    "id": "<string>",
    "name": "<string>",
    "inboundFrom": [
      {
        "stepID": "<string>",
        "port": "<string>"
      }
    ],
    "steps": [
      {
        "id": "<string>",
        "kind": "<StableWorkflowStepKind>",
        "exitClass": "<StableWorkflowExitClass>",
        "content": "<StableWorkflowStepContent>",
        "fallsThroughTo": "<string>",
        "suppressedPorts": [
          "<string>"
        ],
        "links": [
          "<StableWorkflowLink>"
        ],
        "reconciledPorts": "<StableWorkflowReconciledPorts>",
        "warnings": [
          "<StableWorkflowDiagnostic>"
        ]
      }
    ]
  },
  "tail": {
    "id": "<string>",
    "name": "<string>",
    "inboundFrom": [
      {
        "stepID": "<string>",
        "port": "<string>"
      }
    ],
    "steps": [
      {
        "id": "<string>",
        "kind": "<StableWorkflowStepKind>",
        "exitClass": "<StableWorkflowExitClass>",
        "content": "<StableWorkflowStepContent>",
        "fallsThroughTo": "<string>",
        "suppressedPorts": [
          "<string>"
        ],
        "links": [
          "<StableWorkflowLink>"
        ],
        "reconciledPorts": "<StableWorkflowReconciledPorts>",
        "warnings": [
          "<StableWorkflowDiagnostic>"
        ]
      }
    ]
  },
  "clearedLinks": [
    {
      "stepID": "<string>",
      "port": "<string>",
      "to": "<string>",
      "actions": [
        "<string>"
      ]
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/block/<blockID>/split?projectID=<projectID>&environmentAlias=<environmentAlias>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "atStepID": "<string>",
  "name": "<string>",
  "expectedSteps": [
    "<string>"
  ],
  "acknowledgeRewire": true
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/block/<blockID>/split?projectID=<projectID>&environmentAlias=<environmentAlias>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "atStepID": "<string>",
    "name": "<string>",
    "expectedSteps": [
      "<string>"
    ],
    "acknowledgeRewire": true
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/block/<blockID>/split?projectID=<projectID>&environmentAlias=<environmentAlias>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "atStepID": "<string>",
      "name": "<string>",
      "expectedSteps": [
        "<string>"
      ],
      "acknowledgeRewire": True
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf workflow split-block --workflow-id <workflowID> --block-id <blockID> --project-id <projectID> --environment-alias <environmentAlias> <<'JSON'
{
  "atStepID": "<string>",
  "name": "<string>",
  "expectedSteps": [
    "<string>"
  ],
  "acknowledgeRewire": true
}
JSON
```


## Insert workflow step

Adds a step to a block, either after a step you name or at the start of the block. Send `expectedSteps` as your last read returned them; if the block changed since then, the call returns 409 and writes nothing.

### Endpoint

```http
POST /v1/stable/workflow/{workflowID}/block/{blockID}/step
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workflowID`

Required · string

The ID of the workflow to operate on.

```json
{
  "type": "string"
}
```

#### `blockID`

Required · string

The ID of the block to operate on.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableWorkflowStepInsertRequest"
      }
    }
  }
}
```

### Responses

#### 201

Returns what was written, the block that holds the new step, the step itself, and the IDs the server created.

Schema:

```json
{
  "$ref": "#/components/schemas/StableWorkflowStepWriteResponse"
}
```

Example:

```json
{
  "message": "<string>",
  "blockID": "<string>",
  "step": {
    "id": "<string>",
    "kind": "message",
    "exitClass": "sequential",
    "content": {
      "responseType": "message",
      "messageID": "<string>",
      "waitForUserResponse": true
    },
    "fallsThroughTo": "<string>",
    "suppressedPorts": [
      "<string>"
    ],
    "links": [
      {
        "port": "<string>",
        "label": "<string>",
        "to": "<string>",
        "actions": [
          "<StableWorkflowPortAction>"
        ],
        "overridden": true,
        "effectiveTo": "<string>"
      }
    ],
    "reconciledPorts": {
      "added": [
        "<string>"
      ],
      "removed": [
        "<string>"
      ]
    },
    "warnings": [
      {
        "code": "<StableWorkflowDiagnosticCode>",
        "detail": "<string>"
      }
    ]
  },
  "portAction": {
    "stepID": "<string>",
    "port": "<string>",
    "index": 0
  },
  "ids": {},
  "clearedLinks": [
    {
      "stepID": "<string>",
      "port": "<string>",
      "to": "<string>",
      "actions": [
        "<string>"
      ]
    }
  ],
  "unresolvedReferences": [
    {
      "path": "<string>",
      "token": "<string>",
      "reason": "unknown"
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/block/<blockID>/step?projectID=<projectID>&environmentAlias=<environmentAlias>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "afterStepID": "<string>",
  "atStart": true,
  "step": {
    "kind": "message",
    "key": "<StableWorkflowSeedKey>",
    "content": {
      "responseType": "message",
      "messageID": "<string>",
      "waitForUserResponse": true
    },
    "links": {}
  },
  "expectedSteps": [
    "<string>"
  ],
  "acknowledgeRewire": true
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/block/<blockID>/step?projectID=<projectID>&environmentAlias=<environmentAlias>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "afterStepID": "<string>",
    "atStart": true,
    "step": {
      "kind": "message",
      "key": "<StableWorkflowSeedKey>",
      "content": {
        "responseType": "message",
        "messageID": "<string>",
        "waitForUserResponse": true
      },
      "links": {}
    },
    "expectedSteps": [
      "<string>"
    ],
    "acknowledgeRewire": true
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/block/<blockID>/step?projectID=<projectID>&environmentAlias=<environmentAlias>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "afterStepID": "<string>",
      "atStart": True,
      "step": {
        "kind": "message",
        "key": "<StableWorkflowSeedKey>",
        "content": {
          "responseType": "message",
          "messageID": "<string>",
          "waitForUserResponse": True
        },
        "links": {}
      },
      "expectedSteps": [
        "<string>"
      ],
      "acknowledgeRewire": True
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf workflow insert-step --workflow-id <workflowID> --block-id <blockID> --project-id <projectID> --environment-alias <environmentAlias> <<'JSON'
{
  "afterStepID": "<string>",
  "atStart": true,
  "step": {
    "kind": "message",
    "key": "<StableWorkflowSeedKey>",
    "content": {
      "responseType": "message",
      "messageID": "<string>",
      "waitForUserResponse": true
    },
    "links": {}
  },
  "expectedSteps": [
    "<string>"
  ],
  "acknowledgeRewire": true
}
JSON
```


## Add workflow branch

Gives a Condition, Buttons, Card, Carousel, Code or Crew step one more way out. When you send `to`, the call also links the new branch to a block.

### Endpoint

```http
POST /v1/stable/workflow/{workflowID}/step/{stepID}/branch
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workflowID`

Required · string

The ID of the workflow to operate on.

```json
{
  "type": "string"
}
```

#### `stepID`

Required · string

The ID of the step to operate on.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableWorkflowBranchAddRequest"
      }
    }
  }
}
```

### Responses

#### 201

Returns the new branch's ID, which is also its port key, and the step with the branch added.

Schema:

```json
{
  "$ref": "#/components/schemas/StableWorkflowBranchWriteResponse"
}
```

Example:

```json
{
  "message": "<string>",
  "branchID": "<string>",
  "step": {
    "id": "<string>",
    "kind": "message",
    "exitClass": "sequential",
    "content": {
      "responseType": "message",
      "messageID": "<string>",
      "waitForUserResponse": true
    },
    "fallsThroughTo": "<string>",
    "suppressedPorts": [
      "<string>"
    ],
    "links": [
      {
        "port": "<string>",
        "label": "<string>",
        "to": "<string>",
        "actions": [
          "<StableWorkflowPortAction>"
        ],
        "overridden": true,
        "effectiveTo": "<string>"
      }
    ],
    "reconciledPorts": {
      "added": [
        "<string>"
      ],
      "removed": [
        "<string>"
      ]
    },
    "warnings": [
      {
        "code": "<StableWorkflowDiagnosticCode>",
        "detail": "<string>"
      }
    ]
  },
  "unresolvedReferences": [
    {
      "path": "<string>",
      "token": "<string>",
      "reason": "unknown"
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>/branch?projectID=<projectID>&environmentAlias=<environmentAlias>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "label": "<string>",
  "matchAll": true,
  "assertions": [
    {
      "id": "<string>",
      "lhs": {
        "variableID": "<string>",
        "path": "<string>"
      },
      "operation": "<ConditionOperation>",
      "rhs": "<VariableReferenceString>"
    }
  ],
  "to": "<string>",
  "kind": "condition"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>/branch?projectID=<projectID>&environmentAlias=<environmentAlias>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "label": "<string>",
    "matchAll": true,
    "assertions": [
      {
        "id": "<string>",
        "lhs": {
          "variableID": "<string>",
          "path": "<string>"
        },
        "operation": "<ConditionOperation>",
        "rhs": "<VariableReferenceString>"
      }
    ],
    "to": "<string>",
    "kind": "condition"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>/branch?projectID=<projectID>&environmentAlias=<environmentAlias>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "label": "<string>",
      "matchAll": True,
      "assertions": [
        {
          "id": "<string>",
          "lhs": {
            "variableID": "<string>",
            "path": "<string>"
          },
          "operation": "<ConditionOperation>",
          "rhs": "<VariableReferenceString>"
        }
      ],
      "to": "<string>",
      "kind": "condition"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf workflow add-branch --workflow-id <workflowID> --step-id <stepID> --project-id <projectID> --environment-alias <environmentAlias> <<'JSON'
{
  "label": "<string>",
  "matchAll": true,
  "assertions": [
    {
      "id": "<string>",
      "lhs": {
        "variableID": "<string>",
        "path": "<string>"
      },
      "operation": "<ConditionOperation>",
      "rhs": "<VariableReferenceString>"
    }
  ],
  "to": "<string>",
  "kind": "condition"
}
JSON
```


## Update workflow branch

Edits a branch's label, assertions, URL or exit path details. The branch keeps its link; use the link operation to repoint it. `assertions` replaces the branch's whole list of checks.

### Endpoint

```http
PATCH /v1/stable/workflow/{workflowID}/step/{stepID}/branch/{branchID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workflowID`

Required · string

The ID of the workflow to operate on.

```json
{
  "type": "string"
}
```

#### `stepID`

Required · string

The ID of the step to operate on.

```json
{
  "type": "string"
}
```

#### `branchID`

Required · string

The ID of the branch to operate on.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableWorkflowBranchUpdateRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns what was written, the branch ID, and the step with the branch's new content.

Schema:

```json
{
  "$ref": "#/components/schemas/StableWorkflowBranchWriteResponse"
}
```

Example:

```json
{
  "message": "<string>",
  "branchID": "<string>",
  "step": {
    "id": "<string>",
    "kind": "message",
    "exitClass": "sequential",
    "content": {
      "responseType": "message",
      "messageID": "<string>",
      "waitForUserResponse": true
    },
    "fallsThroughTo": "<string>",
    "suppressedPorts": [
      "<string>"
    ],
    "links": [
      {
        "port": "<string>",
        "label": "<string>",
        "to": "<string>",
        "actions": [
          "<StableWorkflowPortAction>"
        ],
        "overridden": true,
        "effectiveTo": "<string>"
      }
    ],
    "reconciledPorts": {
      "added": [
        "<string>"
      ],
      "removed": [
        "<string>"
      ]
    },
    "warnings": [
      {
        "code": "<StableWorkflowDiagnosticCode>",
        "detail": "<string>"
      }
    ]
  },
  "unresolvedReferences": [
    {
      "path": "<string>",
      "token": "<string>",
      "reason": "unknown"
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request PATCH \
  --url 'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>/branch/<branchID>?projectID=<projectID>&environmentAlias=<environmentAlias>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "label": "<string>",
  "matchAll": true,
  "assertions": [
    {
      "id": "<string>",
      "lhs": {
        "variableID": "<string>",
        "path": "<string>"
      },
      "operation": "<ConditionOperation>",
      "rhs": "<VariableReferenceString>"
    }
  ],
  "kind": "condition"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>/branch/<branchID>?projectID=<projectID>&environmentAlias=<environmentAlias>', {
  method: 'PATCH',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "label": "<string>",
    "matchAll": true,
    "assertions": [
      {
        "id": "<string>",
        "lhs": {
          "variableID": "<string>",
          "path": "<string>"
        },
        "operation": "<ConditionOperation>",
        "rhs": "<VariableReferenceString>"
      }
    ],
    "kind": "condition"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.patch(
    'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>/branch/<branchID>?projectID=<projectID>&environmentAlias=<environmentAlias>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "label": "<string>",
      "matchAll": True,
      "assertions": [
        {
          "id": "<string>",
          "lhs": {
            "variableID": "<string>",
            "path": "<string>"
          },
          "operation": "<ConditionOperation>",
          "rhs": "<VariableReferenceString>"
        }
      ],
      "kind": "condition"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf workflow update-branch --workflow-id <workflowID> --step-id <stepID> --branch-id <branchID> --project-id <projectID> --environment-alias <environmentAlias> <<'JSON'
{
  "label": "<string>",
  "matchAll": true,
  "assertions": [
    {
      "id": "<string>",
      "lhs": {
        "variableID": "<string>",
        "path": "<string>"
      },
      "operation": "<ConditionOperation>",
      "rhs": "<VariableReferenceString>"
    }
  ],
  "kind": "condition"
}
JSON
```


## Delete workflow branch

Removes a branch from a step together with its port and link. Removing the last path of a Condition also removes its else port.

### Endpoint

```http
DELETE /v1/stable/workflow/{workflowID}/step/{stepID}/branch/{branchID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workflowID`

Required · string

The ID of the workflow to operate on.

```json
{
  "type": "string"
}
```

#### `stepID`

Required · string

The ID of the step to operate on.

```json
{
  "type": "string"
}
```

#### `branchID`

Required · string

The ID of the branch to operate on.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

### Responses

#### 200

Confirms the branch was deleted. Only a confirmation message comes back.

Schema:

```json
{
  "$ref": "#/components/schemas/StableDeleteResponse"
}
```

Example:

```json
{
  "message": "<string>"
}
```

### Request examples

#### cURL

```bash
curl --request DELETE \
  --url 'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>/branch/<branchID>?projectID=<projectID>&environmentAlias=<environmentAlias>' \
  --header 'Authorization: Bearer <token>'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>/branch/<branchID>?projectID=<projectID>&environmentAlias=<environmentAlias>', {
  method: 'DELETE',
  headers: {
    Authorization: 'Bearer <token>',
  },
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.delete(
    'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>/branch/<branchID>?projectID=<projectID>&environmentAlias=<environmentAlias>',
    headers={'Authorization': 'Bearer <token>'},
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf workflow delete-branch --workflow-id <workflowID> --step-id <stepID> --branch-id <branchID> --project-id <projectID> --environment-alias <environmentAlias>
```


## Add port actions

Adds port actions to one exit of a step. They run in order when the conversation leaves through that exit, before the path reaches the next block. Add 1 to 10 at a time, and send the exit's current action IDs as `expectedActions`.

### Endpoint

```http
POST /v1/stable/workflow/{workflowID}/step/{stepID}/link/{portKey}/actions
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workflowID`

Required · string

The ID of the workflow to operate on.

```json
{
  "type": "string"
}
```

#### `stepID`

Required · string

The ID of the step to operate on.

```json
{
  "type": "string"
}
```

#### `portKey`

Required · string

The port to operate on: next, fail, else, no-reply, or the ID of a branch.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableWorkflowPortActionsAddRequest"
      }
    }
  }
}
```

### Responses

#### 201

Returns what was written, the exit's step and port, and its link. If the last action ends the path, `clearedTo` names the block the exit led to before.

Schema:

```json
{
  "$ref": "#/components/schemas/StableWorkflowPortActionsWriteResponse"
}
```

Example:

```json
{
  "message": "<string>",
  "stepID": "<string>",
  "port": "<string>",
  "link": {
    "port": "<string>",
    "label": "<string>",
    "to": "<string>",
    "actions": [
      {
        "id": "<string>",
        "kind": "<StableWorkflowStepKind>",
        "content": "<StableWorkflowStepContent>",
        "warnings": [
          "<StableWorkflowDiagnostic>"
        ]
      }
    ],
    "overridden": true,
    "effectiveTo": "<string>"
  },
  "clearedTo": "<string>",
  "unresolvedReferences": [
    {
      "path": "<string>",
      "token": "<string>",
      "reason": "unknown"
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>/link/<portKey>/actions?projectID=<projectID>&environmentAlias=<environmentAlias>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "actions": [
    {
      "kind": "goToBlock",
      "content": "<StableWorkflowStepGoToBlockContentInput>"
    }
  ],
  "afterActionID": "<string>",
  "atStart": true,
  "expectedActions": [
    "<string>"
  ],
  "to": "<string>"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>/link/<portKey>/actions?projectID=<projectID>&environmentAlias=<environmentAlias>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "actions": [
      {
        "kind": "goToBlock",
        "content": "<StableWorkflowStepGoToBlockContentInput>"
      }
    ],
    "afterActionID": "<string>",
    "atStart": true,
    "expectedActions": [
      "<string>"
    ],
    "to": "<string>"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>/link/<portKey>/actions?projectID=<projectID>&environmentAlias=<environmentAlias>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "actions": [
        {
          "kind": "goToBlock",
          "content": "<StableWorkflowStepGoToBlockContentInput>"
        }
      ],
      "afterActionID": "<string>",
      "atStart": True,
      "expectedActions": [
        "<string>"
      ],
      "to": "<string>"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf workflow add-actions --workflow-id <workflowID> --step-id <stepID> --port-key <portKey> --project-id <projectID> --environment-alias <environmentAlias> <<'JSON'
{
  "actions": [
    {
      "kind": "goToBlock",
      "content": "<StableWorkflowStepGoToBlockContentInput>"
    }
  ],
  "afterActionID": "<string>",
  "atStart": true,
  "expectedActions": [
    "<string>"
  ],
  "to": "<string>"
}
JSON
```


## Reorder port actions

Sets a new running order for the actions on an exit. Send every action ID of the exit; the path still continues to the same block afterward.

### Endpoint

```http
PUT /v1/stable/workflow/{workflowID}/step/{stepID}/link/{portKey}/actions/order
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workflowID`

Required · string

The ID of the workflow to operate on.

```json
{
  "type": "string"
}
```

#### `stepID`

Required · string

The ID of the step to operate on.

```json
{
  "type": "string"
}
```

#### `portKey`

Required · string

The port to operate on: next, fail, else, no-reply, or the ID of a branch.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableWorkflowPortActionsReorderRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns what was written, the exit's step and port, the action IDs in their new order, and the block the path reaches after them.

Schema:

```json
{
  "$ref": "#/components/schemas/StableWorkflowPortActionsOrderResponse"
}
```

Example:

```json
{
  "message": "<string>",
  "stepID": "<string>",
  "port": "<string>",
  "actions": [
    "<string>"
  ],
  "to": "<string>"
}
```

### Request examples

#### cURL

```bash
curl --request PUT \
  --url 'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>/link/<portKey>/actions/order?projectID=<projectID>&environmentAlias=<environmentAlias>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "order": [
    "<string>"
  ]
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>/link/<portKey>/actions/order?projectID=<projectID>&environmentAlias=<environmentAlias>', {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "order": [
      "<string>"
    ]
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.put(
    'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/step/<stepID>/link/<portKey>/actions/order?projectID=<projectID>&environmentAlias=<environmentAlias>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "order": [
        "<string>"
      ]
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf workflow reorder-actions --workflow-id <workflowID> --step-id <stepID> --port-key <portKey> --project-id <projectID> --environment-alias <environmentAlias> <<'JSON'
{
  "order": [
    "<string>"
  ]
}
JSON
```


## Replace port action

Replaces one action on a block exit with a new action of any kind, keeping its place in the run order. The new action gets a new ID, and an action that ends the path drops the link the exit had.

### Endpoint

```http
PUT /v1/stable/workflow/{workflowID}/action/{actionID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workflowID`

Required · string

The ID of the workflow that holds the action.

```json
{
  "type": "string"
}
```

#### `actionID`

Required · string

The ID of the action to replace.

```json
{
  "type": "string"
}
```

### Query parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string",
  "description": "The ID of the project to operate on."
}
```

#### `environmentAlias`

Required · string

The alias of the environment to operate on (e.g. `main`).

```json
{
  "type": "string",
  "description": "The alias of the environment to operate on (e.g. `main`)."
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableWorkflowActionReplaceRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns a message, the step and port that own the exit, the resulting link, the block the exit led to before if the new action ended the path, and any unresolved references.

Schema:

```json
{
  "$ref": "#/components/schemas/StableWorkflowPortActionsWriteResponse"
}
```

Example:

```json
{
  "message": "<string>",
  "stepID": "<string>",
  "port": "<string>",
  "link": {
    "port": "<string>",
    "label": "<string>",
    "to": "<string>",
    "actions": [
      {
        "id": "<string>",
        "kind": "<StableWorkflowStepKind>",
        "content": "<StableWorkflowStepContent>",
        "warnings": [
          "<StableWorkflowDiagnostic>"
        ]
      }
    ],
    "overridden": true,
    "effectiveTo": "<string>"
  },
  "clearedTo": "<string>",
  "unresolvedReferences": [
    {
      "path": "<string>",
      "token": "<string>",
      "reason": "unknown"
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request PUT \
  --url 'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/action/<actionID>?projectID=<projectID>&environmentAlias=<environmentAlias>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "action": {
    "kind": "goToBlock",
    "content": {
      "targetBlockID": "<string>",
      "targetWorkflowID": "<string>"
    }
  },
  "expectedActions": [
    "<string>"
  ]
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/action/<actionID>?projectID=<projectID>&environmentAlias=<environmentAlias>', {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "action": {
      "kind": "goToBlock",
      "content": {
        "targetBlockID": "<string>",
        "targetWorkflowID": "<string>"
      }
    },
    "expectedActions": [
      "<string>"
    ]
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.put(
    'https://realtime-api.voiceflow.com/v1/stable/workflow/<workflowID>/action/<actionID>?projectID=<projectID>&environmentAlias=<environmentAlias>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "action": {
        "kind": "goToBlock",
        "content": {
          "targetBlockID": "<string>",
          "targetWorkflowID": "<string>"
        }
      },
      "expectedActions": [
        "<string>"
      ]
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf workflow replace-action --workflow-id <workflowID> --action-id <actionID> --project-id <projectID> --environment-alias <environmentAlias> <<'JSON'
{
  "action": {
    "kind": "goToBlock",
    "content": {
      "targetBlockID": "<string>",
      "targetWorkflowID": "<string>"
    }
  },
  "expectedActions": [
    "<string>"
  ]
}
JSON
```


## Schema definitions

### CarouselV2NodeLayout

```json
{
  "type": "string",
  "enum": [
    "List",
    "Carousel"
  ],
  "x-enumNames": [
    "LIST",
    "CAROUSEL"
  ]
}
```

### ConditionAssertionLhs

```json
{
  "type": "object",
  "properties": {
    "variableID": {
      "nullable": true,
      "type": "string"
    },
    "path": {
      "type": "string"
    }
  },
  "required": [
    "variableID"
  ]
}
```

### ConditionOperation

```json
{
  "type": "string",
  "enum": [
    "is",
    "is_not",
    "greater_than",
    "greater_or_equal",
    "less_than",
    "less_or_equal",
    "contains",
    "not_contains",
    "starts_with",
    "ends_with",
    "is_empty",
    "is_not_empty"
  ],
  "x-enumNames": [
    "IS",
    "IS_NOT",
    "GREATER_THAN",
    "GREATER_OR_EQUAL",
    "LESS_THAN",
    "LESS_OR_EQUAL",
    "CONTAINS",
    "NOT_CONTAINS",
    "STARTS_WITH",
    "ENDS_WITH",
    "IS_EMPTY",
    "IS_NOT_EMPTY"
  ]
}
```

### DefaultValueString

```json
{
  "type": "string",
  "description": "Plain text resolved at runtime and never shown to a model. {variable_name} inserts a variable or entity, {secret_name} a project secret, {variable_name.path} a field of a variable. Escape a literal { or \\ with a backslash. When a name is both a variable and a secret, the secret wins. A name matching none is stored as literal text and reported in unresolvedReferences. Where the field is sent to an upstream system, an unresolved placeholder may be sent as literal text; on an MCP server it is re-resolved by name at connect time, so a literal that matches a real secret binds."
}
```

### LiveAgentHandoffContextType

```json
{
  "type": "string",
  "enum": [
    "full",
    "none",
    "custom"
  ],
  "x-enumNames": [
    "FULL",
    "NONE",
    "CUSTOM"
  ]
}
```

### MarkdownLikeString

```json
{
  "type": "string",
  "description": "Message text shown to the end user. Limited markdown: **bold**, _italic_, <u>underline</u>, ~~strikethrough~~, [label](url). {variable_name} inserts a variable or entity, {variable_name.path} a field of a variable. Escape a literal { or \\ with a backslash. A name matching neither is stored as literal text and reported in unresolvedReferences; secrets are not available here."
}
```

### SetV3NodePropertyItemOperationType

```json
{
  "type": "string",
  "enum": [
    "append",
    "replace"
  ],
  "x-enumNames": [
    "APPEND",
    "REPLACE"
  ]
}
```

### StableConditionAssertion

```json
{
  "type": "object",
  "properties": {
    "key": {
      "type": "string"
    },
    "lhs": {
      "$ref": "#/components/schemas/ConditionAssertionLhs"
    },
    "rhs": {
      "$ref": "#/components/schemas/VariableReferenceString"
    },
    "operation": {
      "default": "is",
      "allOf": [
        {
          "$ref": "#/components/schemas/ConditionOperation"
        }
      ]
    }
  },
  "required": [
    "key",
    "lhs",
    "rhs"
  ]
}
```

### StableDeleteResponse

```json
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A human-readable message confirming the deletion."
    }
  },
  "required": [
    "message"
  ]
}
```

### StableExpressionCondition

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "value-variable"
      ],
      "x-enumNames": [
        "VALUE_VARIABLE"
      ]
    },
    "matchAll": {
      "type": "boolean"
    },
    "assertions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableConditionAssertion"
      }
    }
  },
  "required": [
    "type",
    "matchAll",
    "assertions"
  ]
}
```

### StableToolMessageGenerative

```json
{
  "type": "object",
  "properties": {
    "enabled": {
      "type": "boolean"
    },
    "examples": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/MarkdownLikeString"
      }
    }
  },
  "required": [
    "enabled"
  ]
}
```

### StableToolMessageRequest

```json
{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "generative"
          ],
          "description": "Discriminator: the model writes this message itself, guided by the examples below.",
          "x-enumNames": [
            "GENERATIVE"
          ]
        },
        "examples": {
          "minItems": 1,
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/MarkdownLikeString"
          },
          "description": "Example phrasings the model writes from. Replaces every example the slot holds today."
        }
      },
      "required": [
        "type",
        "examples"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "scripted"
          ],
          "description": "Discriminator: this message is a fixed response, said verbatim.",
          "x-enumNames": [
            "SCRIPTED"
          ]
        },
        "messageID": {
          "type": "string",
          "description": "The ID of an existing response in this environment — the same ID this slot reports as <slot>MessageID on a read."
        }
      },
      "required": [
        "type",
        "messageID"
      ],
      "additionalProperties": false
    }
  ],
  "description": "A tool message in one of its two forms. Writing one form switches the slot to it and leaves the other form stored but inactive, exactly as the editor does — so switching back does not have to be retyped."
}
```

### StableUnresolvedReference

```json
{
  "type": "object",
  "properties": {
    "path": {
      "type": "string",
      "description": "Dotted path of the field that carried it, e.g. `knowledgeBaseTool.filters[0].defaultValue`."
    },
    "token": {
      "type": "string",
      "description": "The reference as written, without braces."
    },
    "reason": {
      "type": "string",
      "enum": [
        "unknown",
        "secret-not-allowed",
        "path-on-non-variable",
        "resource-id",
        "invalid-name",
        "dangling"
      ],
      "description": "`unknown`: no variable or entity of that name. `secret-not-allowed`: the name is a project secret and this field does not accept one. `path-on-non-variable`: only a variable has fields. `resource-id`: a bare resource id, not a name. `invalid-name`: outside the `^\\w{1,64}$` name grammar. `dangling`: the reference rendered as a bare id, because its row is gone or its name is outside the name grammar.",
      "x-enumNames": [
        "UNKNOWN",
        "SECRET_NOT_ALLOWED",
        "PATH_ON_NON_VARIABLE",
        "RESOURCE_ID",
        "INVALID_NAME",
        "DANGLING"
      ]
    }
  },
  "required": [
    "path",
    "token",
    "reason"
  ]
}
```

### StableUpdateResponse

```json
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A human-readable message confirming the update."
    }
  },
  "required": [
    "message"
  ]
}
```

### StableWorkflowActionReplaceRequest

```json
{
  "type": "object",
  "properties": {
    "action": {
      "$ref": "#/components/schemas/StableWorkflowPortActionInput"
    },
    "expectedActions": {
      "minItems": 1,
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The IDs in this exit's actions from your last read, in order."
    }
  },
  "required": [
    "action",
    "expectedActions"
  ],
  "additionalProperties": false
}
```

### StableWorkflowArrangeRequest

```json
{
  "type": "object",
  "properties": {
    "blockIDs": {
      "description": "Move only these blocks, as a group laid out by the links between them. Leave it out to arrange every block from the Start.",
      "minItems": 1,
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "additionalProperties": false
}
```

### StableWorkflowArrangeResponse

```json
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "What was written."
    },
    "moved": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "blockID": {
            "type": "string"
          },
          "x": {
            "type": "number"
          },
          "y": {
            "type": "number"
          }
        },
        "required": [
          "blockID",
          "x",
          "y"
        ]
      },
      "description": "Each block that moved, with its new position."
    }
  },
  "required": [
    "message",
    "moved"
  ]
}
```

### StableWorkflowBlock

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "inboundFrom": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowInbound"
      },
      "description": "Every step port that links to this block."
    },
    "steps": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowStep"
      },
      "description": "The steps in the order they run."
    }
  },
  "required": [
    "id",
    "name",
    "inboundFrom",
    "steps"
  ]
}
```

### StableWorkflowBlockCreateRequest

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 255
    },
    "color": {
      "type": "string",
      "maxLength": 64
    },
    "placement": {
      "description": "Place the new block to the right of this block. Without it, the block goes next to the block of from.stepID, or right of the right-most block.",
      "type": "object",
      "properties": {
        "afterBlockID": {
          "type": "string"
        }
      },
      "required": [
        "afterBlockID"
      ],
      "additionalProperties": false
    },
    "from": {
      "description": "Also link this port to the new block in the same call, with the same checks as voiceflow_workflow.link.",
      "type": "object",
      "properties": {
        "stepID": {
          "type": "string"
        },
        "port": {
          "type": "string"
        }
      },
      "required": [
        "stepID",
        "port"
      ],
      "additionalProperties": false
    },
    "steps": {
      "minItems": 1,
      "maxItems": 20,
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowStepInput"
      }
    }
  },
  "required": [
    "name",
    "steps"
  ],
  "additionalProperties": false
}
```

### StableWorkflowBlockSplitRequest

```json
{
  "type": "object",
  "properties": {
    "atStepID": {
      "type": "string",
      "description": "The step that starts the new block. It and every step below it move there, and the step above it becomes the last step of the block. To make step X the last step, so that its fail and path ports run, send the step below X. It must not be the first step."
    },
    "name": {
      "description": "The new block name. Default: the block name with \" (continued)\".",
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "expectedSteps": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The block's step IDs exactly as your last read returned them. If the block changed, nothing is written."
    },
    "acknowledgeRewire": {
      "description": "Required when the step that becomes the last step has hidden links or actions. The split keeps them, so they start to run. An action list on its next exit is deleted, because next links to the new block.",
      "type": "boolean"
    }
  },
  "required": [
    "atStepID",
    "expectedSteps"
  ],
  "additionalProperties": false
}
```

### StableWorkflowBlockUpdateRequest

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 255
    },
    "color": {
      "type": "string",
      "maxLength": 64
    }
  },
  "additionalProperties": false
}
```

### StableWorkflowBlockWriteResponseV2

```json
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    },
    "block": {
      "$ref": "#/components/schemas/StableWorkflowBlock"
    },
    "ids": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Every key in the request, mapped to the ID the server created."
    },
    "unresolvedReferences": {
      "description": "References this write kept as literal text instead of binding, each with the reason. The write still succeeded.",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableUnresolvedReference"
      }
    },
    "replacedLink": {
      "description": "Present when from already led to another block: the link this call replaced.",
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowReplacedLink"
        }
      ]
    }
  },
  "required": [
    "message",
    "block",
    "ids"
  ]
}
```

### StableWorkflowBlocksAddRequest

```json
{
  "type": "object",
  "properties": {
    "blocks": {
      "minItems": 1,
      "maxItems": 20,
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowSeedBlock"
      },
      "description": "The new blocks. A step's links and a branch's to name a block key from this call or an existing block ID."
    },
    "from": {
      "description": "Existing ports to link to new blocks in the same call, with the same checks as voiceflow_workflow.link.",
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "stepID": {
            "type": "string",
            "description": "The step that owns the port, or entry.stepID for the Start."
          },
          "port": {
            "type": "string",
            "description": "The port key: next, else, fail, no-reply, conversation-turn, or a branch or path ID."
          },
          "to": {
            "description": "The key of a block in this call.",
            "allOf": [
              {
                "$ref": "#/components/schemas/StableWorkflowSeedKey"
              }
            ]
          }
        },
        "required": [
          "stepID",
          "port",
          "to"
        ],
        "additionalProperties": false
      }
    },
    "placement": {
      "description": "Place the new blocks to the right of this block. Without it, they go right of the block of the first from step, or right of the right-most block.",
      "type": "object",
      "properties": {
        "afterBlockID": {
          "type": "string"
        }
      },
      "required": [
        "afterBlockID"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "blocks"
  ],
  "additionalProperties": false
}
```

### StableWorkflowBlocksAddResponse

```json
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "What was written."
    },
    "blocks": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowBlock"
      },
      "description": "The new blocks, in the order you sent them."
    },
    "ids": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Every key in the request, mapped to the ID the server created."
    },
    "linked": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowLinkedExit"
      },
      "description": "The from ports, each with the block it led to before."
    },
    "unresolvedReferences": {
      "description": "References this write kept as literal text instead of binding, each with the reason. The write still succeeded.",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableUnresolvedReference"
      }
    }
  },
  "required": [
    "message",
    "blocks",
    "ids",
    "linked"
  ]
}
```

### StableWorkflowBranchAddRequest

```json
{
  "oneOf": [
    {
      "$ref": "#/components/schemas/StableWorkflowConditionBranchAdd"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowButtonsBranchAdd"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowCardBranchAdd"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowCarouselBranchAdd"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowCodeBranchAdd"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowCrewBranchAdd"
    }
  ]
}
```

### StableWorkflowBranchUpdateRequest

```json
{
  "oneOf": [
    {
      "$ref": "#/components/schemas/StableWorkflowConditionBranchUpdate"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowButtonsBranchUpdate"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowCardBranchUpdate"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowCarouselBranchUpdate"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowCodeBranchUpdate"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowCrewBranchUpdate"
    }
  ]
}
```

### StableWorkflowBranchWriteResponse

```json
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "What was written."
    },
    "branchID": {
      "type": "string",
      "description": "The branch ID. It is also the port key that link and unlink take."
    },
    "step": {
      "$ref": "#/components/schemas/StableWorkflowStep"
    },
    "unresolvedReferences": {
      "description": "References this write kept as literal text instead of binding, each with the reason. The write still succeeded.",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableUnresolvedReference"
      }
    }
  },
  "required": [
    "message",
    "branchID",
    "step"
  ]
}
```

### StableWorkflowButtonInput

```json
{
  "type": "object",
  "properties": {
    "key": {
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowSeedKey"
        }
      ]
    },
    "label": {
      "$ref": "#/components/schemas/VariableReferenceString"
    },
    "url": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      ]
    },
    "to": {
      "type": "string",
      "description": "The block this branch leads to. In create, a block key from this request; in add_blocks, a block key from this request or an existing block ID; everywhere else, an existing block ID."
    }
  },
  "required": [
    "label"
  ],
  "additionalProperties": false
}
```

### StableWorkflowButtonsBranchAdd

```json
{
  "type": "object",
  "properties": {
    "label": {
      "$ref": "#/components/schemas/VariableReferenceString"
    },
    "url": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      ]
    },
    "to": {
      "type": "string",
      "description": "The block this branch leads to. In create, a block key from this request; in add_blocks, a block key from this request or an existing block ID; everywhere else, an existing block ID."
    },
    "kind": {
      "type": "string",
      "enum": [
        "buttons"
      ],
      "x-enumNames": [
        "BUTTONS"
      ]
    }
  },
  "required": [
    "label",
    "kind"
  ],
  "additionalProperties": false
}
```

### StableWorkflowButtonsBranchUpdate

```json
{
  "type": "object",
  "properties": {
    "label": {
      "allOf": [
        {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      ]
    },
    "url": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      ]
    },
    "kind": {
      "type": "string",
      "enum": [
        "buttons"
      ],
      "x-enumNames": [
        "BUTTONS"
      ]
    }
  },
  "required": [
    "kind"
  ],
  "additionalProperties": false
}
```

### StableWorkflowCardBranchAdd

```json
{
  "type": "object",
  "properties": {
    "label": {
      "$ref": "#/components/schemas/VariableReferenceString"
    },
    "url": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      ]
    },
    "to": {
      "type": "string",
      "description": "The block this branch leads to. In create, a block key from this request; in add_blocks, a block key from this request or an existing block ID; everywhere else, an existing block ID."
    },
    "kind": {
      "type": "string",
      "enum": [
        "card"
      ],
      "x-enumNames": [
        "CARD"
      ]
    }
  },
  "required": [
    "label",
    "kind"
  ],
  "additionalProperties": false
}
```

### StableWorkflowCardBranchUpdate

```json
{
  "type": "object",
  "properties": {
    "label": {
      "allOf": [
        {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      ]
    },
    "url": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      ]
    },
    "kind": {
      "type": "string",
      "enum": [
        "card"
      ],
      "x-enumNames": [
        "CARD"
      ]
    }
  },
  "required": [
    "kind"
  ],
  "additionalProperties": false
}
```

### StableWorkflowCarouselBranchAdd

```json
{
  "type": "object",
  "properties": {
    "label": {
      "$ref": "#/components/schemas/VariableReferenceString"
    },
    "url": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      ]
    },
    "to": {
      "type": "string",
      "description": "The block this branch leads to. In create, a block key from this request; in add_blocks, a block key from this request or an existing block ID; everywhere else, an existing block ID."
    },
    "kind": {
      "type": "string",
      "enum": [
        "carousel"
      ],
      "x-enumNames": [
        "CAROUSEL"
      ]
    },
    "cardID": {
      "type": "string",
      "description": "The card the new button goes on."
    }
  },
  "required": [
    "label",
    "kind",
    "cardID"
  ],
  "additionalProperties": false
}
```

### StableWorkflowCarouselBranchUpdate

```json
{
  "type": "object",
  "properties": {
    "label": {
      "allOf": [
        {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      ]
    },
    "url": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      ]
    },
    "kind": {
      "type": "string",
      "enum": [
        "carousel"
      ],
      "x-enumNames": [
        "CAROUSEL"
      ]
    }
  },
  "required": [
    "kind"
  ],
  "additionalProperties": false
}
```

### StableWorkflowCarouselCardInput

```json
{
  "type": "object",
  "properties": {
    "title": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      ]
    },
    "description": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/MarkdownLikeString"
        }
      ]
    },
    "imageUrl": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      ]
    },
    "buttons": {
      "maxItems": 20,
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowButtonInput"
      }
    }
  },
  "additionalProperties": false
}
```

### StableWorkflowClearedLink

```json
{
  "type": "object",
  "properties": {
    "stepID": {
      "type": "string",
      "description": "The step whose port lost its link."
    },
    "port": {
      "type": "string",
      "description": "The port key, for example fail or a path ID."
    },
    "to": {
      "nullable": true,
      "description": "The block the path reached before the write, after any actions. Null when it reached no block.",
      "type": "string"
    },
    "actions": {
      "description": "The actions that ran on this exit. They were deleted with the link.",
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "stepID",
    "port",
    "to"
  ]
}
```

### StableWorkflowCodeBranchAdd

```json
{
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "to": {
      "type": "string",
      "description": "The block this branch leads to. In create, a block key from this request; in add_blocks, a block key from this request or an existing block ID; everywhere else, an existing block ID."
    },
    "kind": {
      "type": "string",
      "enum": [
        "code"
      ],
      "x-enumNames": [
        "CODE"
      ]
    }
  },
  "required": [
    "label",
    "kind"
  ],
  "additionalProperties": false
}
```

### StableWorkflowCodeBranchUpdate

```json
{
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "enum": [
        "code"
      ],
      "x-enumNames": [
        "CODE"
      ]
    }
  },
  "required": [
    "kind"
  ],
  "additionalProperties": false
}
```

### StableWorkflowCodePathInput

```json
{
  "type": "object",
  "properties": {
    "key": {
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowSeedKey"
        }
      ]
    },
    "label": {
      "type": "string"
    },
    "to": {
      "type": "string",
      "description": "The block this branch leads to. In create, a block key from this request; in add_blocks, a block key from this request or an existing block ID; everywhere else, an existing block ID."
    }
  },
  "required": [
    "label"
  ],
  "additionalProperties": false
}
```

### StableWorkflowConditionBranchAdd

```json
{
  "type": "object",
  "properties": {
    "label": {
      "nullable": true,
      "type": "string"
    },
    "matchAll": {
      "type": "boolean"
    },
    "assertions": {
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "The assertion's ID. Send the id a read returned to keep it; leave it out for a new assertion.",
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "lhs": {
            "type": "object",
            "properties": {
              "variableID": {
                "nullable": true,
                "type": "string"
              },
              "path": {
                "description": "A property path inside the variable, as stored: .status compares {order.status}, [0] the first item. A path without a leading dot or bracket gets a dot.",
                "nullable": true,
                "type": "string"
              }
            },
            "required": [
              "variableID"
            ],
            "additionalProperties": false
          },
          "operation": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ConditionOperation"
              }
            ]
          },
          "rhs": {
            "$ref": "#/components/schemas/VariableReferenceString"
          }
        },
        "required": [
          "lhs",
          "rhs"
        ],
        "additionalProperties": false
      }
    },
    "to": {
      "type": "string",
      "description": "The block this branch leads to. In create, a block key from this request; in add_blocks, a block key from this request or an existing block ID; everywhere else, an existing block ID."
    },
    "kind": {
      "type": "string",
      "enum": [
        "condition"
      ],
      "x-enumNames": [
        "CONDITION"
      ]
    }
  },
  "required": [
    "assertions",
    "kind"
  ],
  "additionalProperties": false
}
```

### StableWorkflowConditionBranchUpdate

```json
{
  "type": "object",
  "properties": {
    "label": {
      "nullable": true,
      "type": "string"
    },
    "matchAll": {
      "type": "boolean"
    },
    "assertions": {
      "description": "Replaces the branch's whole list of checks. Send every check to keep, with its id, and new checks without an id.",
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "The assertion's ID. Send the id a read returned to keep it; leave it out for a new assertion.",
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "lhs": {
            "type": "object",
            "properties": {
              "variableID": {
                "nullable": true,
                "type": "string"
              },
              "path": {
                "description": "A property path inside the variable, as stored: .status compares {order.status}, [0] the first item. A path without a leading dot or bracket gets a dot.",
                "nullable": true,
                "type": "string"
              }
            },
            "required": [
              "variableID"
            ],
            "additionalProperties": false
          },
          "operation": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ConditionOperation"
              }
            ]
          },
          "rhs": {
            "$ref": "#/components/schemas/VariableReferenceString"
          }
        },
        "required": [
          "lhs",
          "rhs"
        ],
        "additionalProperties": false
      }
    },
    "kind": {
      "type": "string",
      "enum": [
        "condition"
      ],
      "x-enumNames": [
        "CONDITION"
      ]
    }
  },
  "required": [
    "kind"
  ],
  "additionalProperties": false
}
```

### StableWorkflowConditionItemInput

```json
{
  "type": "object",
  "properties": {
    "key": {
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowSeedKey"
        }
      ]
    },
    "label": {
      "nullable": true,
      "type": "string"
    },
    "matchAll": {
      "type": "boolean"
    },
    "assertions": {
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "The assertion's ID. Send the id a read returned to keep it; leave it out for a new assertion.",
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "lhs": {
            "type": "object",
            "properties": {
              "variableID": {
                "nullable": true,
                "type": "string"
              },
              "path": {
                "description": "A property path inside the variable, as stored: .status compares {order.status}, [0] the first item. A path without a leading dot or bracket gets a dot.",
                "nullable": true,
                "type": "string"
              }
            },
            "required": [
              "variableID"
            ],
            "additionalProperties": false
          },
          "operation": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ConditionOperation"
              }
            ]
          },
          "rhs": {
            "$ref": "#/components/schemas/VariableReferenceString"
          }
        },
        "required": [
          "lhs",
          "rhs"
        ],
        "additionalProperties": false
      }
    },
    "to": {
      "type": "string",
      "description": "The block this branch leads to. In create, a block key from this request; in add_blocks, a block key from this request or an existing block ID; everywhere else, an existing block ID."
    }
  },
  "required": [
    "assertions"
  ],
  "additionalProperties": false
}
```

### StableWorkflowCreateRequest

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "description": {
      "nullable": true,
      "type": "string"
    },
    "folderID": {
      "nullable": true,
      "type": "string"
    },
    "entry": {
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowSeedKey"
        }
      ]
    },
    "blocks": {
      "maxItems": 20,
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowSeedBlock"
      }
    }
  },
  "required": [
    "name"
  ],
  "additionalProperties": false
}
```

### StableWorkflowCreateResponse

```json
{
  "type": "object",
  "properties": {
    "workflow": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "required": [
        "id"
      ]
    },
    "entry": {
      "type": "object",
      "properties": {
        "stepID": {
          "type": "string"
        },
        "next": {
          "nullable": true,
          "type": "string"
        }
      },
      "required": [
        "stepID",
        "next"
      ]
    },
    "ids": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Every key in the request, mapped to the ID the server created."
    },
    "warnings": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowDiagnostic"
      }
    },
    "unresolvedReferences": {
      "description": "References this write kept as literal text instead of binding, each with the reason. The write still succeeded.",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableUnresolvedReference"
      }
    }
  },
  "required": [
    "workflow",
    "entry",
    "ids",
    "warnings"
  ]
}
```

### StableWorkflowCrewBranchAdd

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1
    },
    "description": {
      "nullable": true,
      "type": "string"
    },
    "requiredVariables": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "description": {
            "nullable": true,
            "type": "string"
          },
          "variableOrEntityID": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "variableOrEntityID"
        ],
        "additionalProperties": false
      }
    },
    "messages": {
      "type": "object",
      "properties": {
        "execution": {
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/components/schemas/StableToolMessageRequest"
            }
          ]
        },
        "failure": {
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/components/schemas/StableToolMessageRequest"
            }
          ]
        },
        "delay": {
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/components/schemas/StableToolMessageRequest"
            }
          ]
        },
        "completion": {
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/components/schemas/StableToolMessageRequest"
            }
          ]
        }
      },
      "additionalProperties": false,
      "description": "One message per slot. null clears the slot; a slot you leave out keeps its message."
    },
    "delayMessageSeconds": {
      "nullable": true,
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "to": {
      "type": "string",
      "description": "The block this branch leads to. In create, a block key from this request; in add_blocks, a block key from this request or an existing block ID; everywhere else, an existing block ID."
    },
    "kind": {
      "type": "string",
      "enum": [
        "crew"
      ],
      "x-enumNames": [
        "CREW"
      ]
    }
  },
  "required": [
    "name",
    "kind"
  ],
  "additionalProperties": false
}
```

### StableWorkflowCrewBranchUpdate

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1
    },
    "description": {
      "nullable": true,
      "type": "string"
    },
    "requiredVariables": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "description": {
            "nullable": true,
            "type": "string"
          },
          "variableOrEntityID": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "variableOrEntityID"
        ],
        "additionalProperties": false
      }
    },
    "kind": {
      "type": "string",
      "enum": [
        "crew"
      ],
      "x-enumNames": [
        "CREW"
      ]
    }
  },
  "required": [
    "kind"
  ],
  "additionalProperties": false
}
```

### StableWorkflowCrewExitMessages

```json
{
  "type": "object",
  "properties": {
    "generative": {
      "type": "object",
      "properties": {
        "execution": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StableToolMessageGenerative"
            }
          ]
        },
        "failure": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StableToolMessageGenerative"
            }
          ]
        },
        "delay": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StableToolMessageGenerative"
            }
          ]
        },
        "completion": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StableToolMessageGenerative"
            }
          ]
        }
      }
    },
    "delayMessageID": {
      "nullable": true,
      "type": "string"
    },
    "failureMessageID": {
      "nullable": true,
      "type": "string"
    },
    "executionMessageID": {
      "nullable": true,
      "type": "string"
    },
    "completionMessageID": {
      "nullable": true,
      "type": "string"
    }
  },
  "required": [
    "delayMessageID",
    "failureMessageID",
    "executionMessageID",
    "completionMessageID"
  ]
}
```

### StableWorkflowCrewExitPathInput

```json
{
  "type": "object",
  "properties": {
    "key": {
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowSeedKey"
        }
      ]
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "description": {
      "nullable": true,
      "type": "string"
    },
    "requiredVariables": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "description": {
            "nullable": true,
            "type": "string"
          },
          "variableOrEntityID": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "variableOrEntityID"
        ],
        "additionalProperties": false
      }
    },
    "messages": {
      "type": "object",
      "properties": {
        "execution": {
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/components/schemas/StableToolMessageRequest"
            }
          ]
        },
        "failure": {
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/components/schemas/StableToolMessageRequest"
            }
          ]
        },
        "delay": {
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/components/schemas/StableToolMessageRequest"
            }
          ]
        },
        "completion": {
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/components/schemas/StableToolMessageRequest"
            }
          ]
        }
      },
      "additionalProperties": false,
      "description": "One message per slot. null clears the slot; a slot you leave out keeps its message."
    },
    "delayMessageSeconds": {
      "nullable": true,
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "to": {
      "type": "string",
      "description": "The block this branch leads to. In create, a block key from this request; in add_blocks, a block key from this request or an existing block ID; everywhere else, an existing block ID."
    }
  },
  "required": [
    "name"
  ],
  "additionalProperties": false
}
```

### StableWorkflowDiagnostic

```json
{
  "type": "object",
  "properties": {
    "code": {
      "$ref": "#/components/schemas/StableWorkflowDiagnosticCode"
    },
    "detail": {
      "type": "string",
      "description": "What is wrong, in one or two sentences, naming the step, block and port."
    }
  },
  "required": [
    "code",
    "detail"
  ]
}
```

### StableWorkflowDiagnosticCode

```json
{
  "type": "string",
  "enum": [
    "BRANCH_NOT_LAST",
    "TERMINAL_NOT_LAST",
    "HIDDEN_LINK",
    "UNREACHABLE_BLOCK",
    "DANGLING_LINK",
    "ORPHAN_STEP",
    "GO_TO_TARGET_MISSING"
  ],
  "x-enumNames": [
    "BRANCH_NOT_LAST",
    "TERMINAL_NOT_LAST",
    "HIDDEN_LINK",
    "UNREACHABLE_BLOCK",
    "DANGLING_LINK",
    "ORPHAN_STEP",
    "GO_TO_TARGET_MISSING"
  ]
}
```

### StableWorkflowDuplicateRequest

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255,
      "description": "The name of the copy."
    }
  },
  "required": [
    "name"
  ],
  "additionalProperties": false
}
```

### StableWorkflowDuplicateResponse

```json
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    },
    "workflow": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "name"
      ],
      "description": "The copy."
    },
    "ids": {
      "type": "object",
      "properties": {
        "messages": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Each message the original's steps say, mapped to its copy."
        },
        "prompts": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Each prompt the original's steps and their messages use, mapped to its copy."
        },
        "playbooks": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Each playbook a Playbook or Crew step runs, mapped to its copy. The copy attaches the same tools."
        },
        "operatorAgents": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Each agent an Operator step runs, mapped to its copy."
        }
      },
      "required": [
        "messages",
        "prompts",
        "playbooks",
        "operatorAgents"
      ],
      "description": "The original ID of each copied resource, mapped to the ID of its copy. Block and step IDs do not change."
    }
  },
  "required": [
    "message",
    "workflow",
    "ids"
  ]
}
```

### StableWorkflowExitClass

```json
{
  "type": "string",
  "enum": [
    "sequential",
    "branch",
    "async-branch",
    "terminal"
  ],
  "description": "How the step leaves. sequential: it continues to the step below it, or through next when it is last. branch: it leaves through one of its links, so it must be last. async-branch: a Card or Carousel, whose linked buttons run from any position. terminal: it ends the path.",
  "x-enumNames": [
    "SEQUENTIAL",
    "BRANCH",
    "ASYNC_BRANCH",
    "TERMINAL"
  ]
}
```

### StableWorkflowHandoffConfig

```json
{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "ujet"
          ],
          "x-enumNames": [
            "UJET"
          ]
        },
        "menuID": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "userID": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "userEmail": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "userLanguage": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "metadata": {
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/components/schemas/VariableReferenceString"
            }
          ]
        }
      },
      "required": [
        "provider",
        "menuID",
        "userID",
        "userEmail",
        "userLanguage",
        "metadata"
      ]
    },
    {
      "type": "object",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "genesys"
          ],
          "x-enumNames": [
            "GENESYS"
          ]
        },
        "integrationId": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "userEmail": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "customerName": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "customerAccountId": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "queueName": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "queueId": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "inactivityTimeout": {
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/components/schemas/VariableReferenceString"
            }
          ]
        },
        "metadata": {
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/components/schemas/VariableReferenceString"
            }
          ]
        }
      },
      "required": [
        "provider",
        "integrationId",
        "userEmail",
        "customerName",
        "customerAccountId",
        "queueName",
        "queueId",
        "inactivityTimeout",
        "metadata"
      ]
    },
    {
      "type": "object",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "kustomer"
          ],
          "x-enumNames": [
            "KUSTOMER"
          ]
        },
        "endUserId": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "userEmail": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "customerName": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "userLanguage": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "assignedTeamId": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "brand": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "title": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "metadata": {
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/components/schemas/VariableReferenceString"
            }
          ]
        }
      },
      "required": [
        "provider",
        "endUserId",
        "userEmail",
        "customerName",
        "userLanguage",
        "assignedTeamId",
        "brand",
        "title",
        "metadata"
      ]
    },
    {
      "type": "object",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "dixa"
          ],
          "x-enumNames": [
            "DIXA"
          ]
        },
        "endUserId": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "userEmail": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "customerName": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "userLanguage": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "queueId": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "metadata": {
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/components/schemas/VariableReferenceString"
            }
          ]
        }
      },
      "required": [
        "provider",
        "endUserId",
        "userEmail",
        "customerName",
        "userLanguage",
        "queueId",
        "metadata"
      ]
    },
    {
      "type": "object",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "sunshine"
          ],
          "x-enumNames": [
            "SUNSHINE"
          ]
        },
        "endUserId": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "userEmail": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "customerName": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "userLanguage": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "groupId": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "brandId": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "priority": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "metadata": {
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/components/schemas/VariableReferenceString"
            }
          ]
        }
      },
      "required": [
        "provider",
        "endUserId",
        "userEmail",
        "customerName",
        "userLanguage",
        "groupId",
        "brandId",
        "priority",
        "metadata"
      ]
    },
    {
      "type": "object",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "custom"
          ],
          "x-enumNames": [
            "CUSTOM"
          ]
        },
        "endUserId": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "userEmail": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "userPhone": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "customerName": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "userLanguage": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "queueId": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "metadata": {
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/components/schemas/VariableReferenceString"
            }
          ]
        }
      },
      "required": [
        "provider",
        "endUserId",
        "userEmail",
        "userPhone",
        "customerName",
        "userLanguage",
        "queueId",
        "metadata"
      ]
    }
  ]
}
```

### StableWorkflowHandoffConfigInput

```json
{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "ujet"
          ],
          "x-enumNames": [
            "UJET"
          ]
        },
        "metadata": {
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/components/schemas/VariableReferenceString"
            }
          ]
        },
        "menuID": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "userID": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "userEmail": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "userLanguage": {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      },
      "required": [
        "provider",
        "menuID",
        "userID",
        "userEmail",
        "userLanguage"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "genesys"
          ],
          "x-enumNames": [
            "GENESYS"
          ]
        },
        "metadata": {
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/components/schemas/VariableReferenceString"
            }
          ]
        },
        "integrationId": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "userEmail": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "customerName": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "customerAccountId": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "queueName": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "queueId": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "inactivityTimeout": {
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/components/schemas/VariableReferenceString"
            }
          ]
        }
      },
      "required": [
        "provider",
        "integrationId",
        "userEmail",
        "customerName",
        "customerAccountId",
        "queueName",
        "queueId"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "kustomer"
          ],
          "x-enumNames": [
            "KUSTOMER"
          ]
        },
        "metadata": {
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/components/schemas/VariableReferenceString"
            }
          ]
        },
        "endUserId": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "userEmail": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "customerName": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "userLanguage": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "assignedTeamId": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "brand": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "title": {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      },
      "required": [
        "provider",
        "endUserId",
        "userEmail",
        "customerName",
        "userLanguage",
        "assignedTeamId",
        "brand",
        "title"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "dixa"
          ],
          "x-enumNames": [
            "DIXA"
          ]
        },
        "metadata": {
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/components/schemas/VariableReferenceString"
            }
          ]
        },
        "endUserId": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "userEmail": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "customerName": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "userLanguage": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "queueId": {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      },
      "required": [
        "provider",
        "endUserId",
        "userEmail",
        "customerName",
        "userLanguage",
        "queueId"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "sunshine"
          ],
          "x-enumNames": [
            "SUNSHINE"
          ]
        },
        "metadata": {
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/components/schemas/VariableReferenceString"
            }
          ]
        },
        "endUserId": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "userEmail": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "customerName": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "userLanguage": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "groupId": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "brandId": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "priority": {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      },
      "required": [
        "provider",
        "endUserId",
        "userEmail",
        "customerName",
        "userLanguage",
        "groupId",
        "brandId",
        "priority"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "custom"
          ],
          "x-enumNames": [
            "CUSTOM"
          ]
        },
        "metadata": {
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/components/schemas/VariableReferenceString"
            }
          ]
        },
        "endUserId": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "userEmail": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "userPhone": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "customerName": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "userLanguage": {
          "$ref": "#/components/schemas/VariableReferenceString"
        },
        "queueId": {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      },
      "required": [
        "provider",
        "endUserId",
        "userEmail",
        "userPhone",
        "customerName",
        "userLanguage",
        "queueId"
      ],
      "additionalProperties": false
    }
  ]
}
```

### StableWorkflowInbound

```json
{
  "type": "object",
  "properties": {
    "stepID": {
      "type": "string"
    },
    "port": {
      "type": "string"
    }
  },
  "required": [
    "stepID",
    "port"
  ]
}
```

### StableWorkflowLink

```json
{
  "type": "object",
  "properties": {
    "port": {
      "type": "string",
      "description": "The port key: next, else, fail, no-reply, conversation-turn, or the ID of a branch or path."
    },
    "label": {
      "type": "string"
    },
    "to": {
      "nullable": true,
      "description": "The block this port reaches. With actions, the block after the last action. Null when it points nowhere, or when its actions end the path.",
      "type": "string"
    },
    "actions": {
      "description": "The port actions this exit runs, in order, before it reaches to.",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowPortAction"
      }
    },
    "overridden": {
      "description": "Present when this link does not run, because the step is not the last of its block.",
      "type": "boolean",
      "enum": [
        true
      ],
      "x-enumNames": [
        "TRUE"
      ]
    },
    "effectiveTo": {
      "description": "With overridden: the step that runs instead.",
      "type": "string"
    }
  },
  "required": [
    "port",
    "label",
    "to"
  ]
}
```

### StableWorkflowLinkManyRequest

```json
{
  "type": "object",
  "properties": {
    "links": {
      "minItems": 1,
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "stepID": {
            "type": "string",
            "description": "The step that owns the port, or entry.stepID for the Start."
          },
          "port": {
            "type": "string",
            "description": "The port key: next, else, fail, no-reply, conversation-turn, or the ID of a branch or path."
          },
          "toBlockID": {
            "type": "string",
            "description": "The block the port will lead to. Links point at blocks, never at a step."
          }
        },
        "required": [
          "stepID",
          "port",
          "toBlockID"
        ],
        "additionalProperties": false
      },
      "description": "1 to 50 ports to link, each once."
    }
  },
  "required": [
    "links"
  ],
  "additionalProperties": false
}
```

### StableWorkflowLinkManyResponse

```json
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "What was written."
    },
    "linked": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowLinkedExit"
      },
      "description": "Every port in the order you sent them, with the block it led to before."
    }
  },
  "required": [
    "message",
    "linked"
  ]
}
```

### StableWorkflowLinkRequest

```json
{
  "type": "object",
  "properties": {
    "toBlockID": {
      "type": "string",
      "description": "The block the port will lead to. Links point at blocks, never at a step inside one."
    }
  },
  "required": [
    "toBlockID"
  ],
  "additionalProperties": false
}
```

### StableWorkflowLinkResponse

```json
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    },
    "link": {
      "type": "object",
      "properties": {
        "stepID": {
          "type": "string"
        },
        "port": {
          "type": "string"
        },
        "to": {
          "nullable": true,
          "description": "The block the port leads to now, or null.",
          "type": "string"
        }
      },
      "required": [
        "stepID",
        "port",
        "to"
      ]
    }
  },
  "required": [
    "message",
    "link"
  ]
}
```

### StableWorkflowLinkResponseV2

```json
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    },
    "link": {
      "type": "object",
      "properties": {
        "stepID": {
          "type": "string"
        },
        "port": {
          "type": "string"
        },
        "to": {
          "nullable": true,
          "description": "The block the port leads to now, or null.",
          "type": "string"
        }
      },
      "required": [
        "stepID",
        "port",
        "to"
      ]
    },
    "replacedLink": {
      "description": "Present when the port already led to another block: the link this call replaced.",
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowReplacedLink"
        }
      ]
    }
  },
  "required": [
    "message",
    "link"
  ]
}
```

### StableWorkflowLinkedExit

```json
{
  "type": "object",
  "properties": {
    "stepID": {
      "type": "string",
      "description": "The step that owns the port, or the start node."
    },
    "port": {
      "type": "string"
    },
    "to": {
      "type": "string",
      "description": "The block the port leads to now."
    },
    "replaced": {
      "nullable": true,
      "description": "What the port led to before this call, after any actions: a block, or a step an older link stored. null when it led nowhere. When it is neither null nor to, the port no longer leads there: tell the user.",
      "type": "string"
    }
  },
  "required": [
    "stepID",
    "port",
    "to",
    "replaced"
  ]
}
```

### StableWorkflowNoMatch

```json
{
  "type": "object",
  "properties": {
    "enabled": {
      "type": "boolean",
      "description": "Whether the no-match path is on: the step then leaves through its else port."
    },
    "repromptID": {
      "nullable": true,
      "description": "The message said when the reply matches nothing, or null.",
      "type": "string"
    }
  },
  "required": [
    "enabled",
    "repromptID"
  ]
}
```

### StableWorkflowNoReply

```json
{
  "type": "object",
  "properties": {
    "enabled": {
      "type": "boolean",
      "description": "Whether the no-reply path is on: the step then leaves through its no-reply port."
    },
    "repromptID": {
      "nullable": true,
      "description": "The message said when the user does not reply, or null.",
      "type": "string"
    },
    "inactivityTime": {
      "nullable": true,
      "description": "Seconds to wait for a reply, or null for the default.",
      "type": "number"
    }
  },
  "required": [
    "enabled",
    "repromptID",
    "inactivityTime"
  ]
}
```

### StableWorkflowPortAction

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The action ID. Use it with the step operations to read, change or delete this action."
    },
    "kind": {
      "$ref": "#/components/schemas/StableWorkflowStepKind"
    },
    "content": {
      "$ref": "#/components/schemas/StableWorkflowStepContent"
    },
    "warnings": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowDiagnostic"
      }
    }
  },
  "required": [
    "id",
    "kind",
    "content"
  ],
  "description": "One action on an exit. Actions run in array order."
}
```

### StableWorkflowPortActionInput

```json
{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "goToBlock"
          ],
          "x-enumNames": [
            "GO_TO_BLOCK"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepGoToBlockContentInput"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "set"
          ],
          "x-enumNames": [
            "SET"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepSetContentInput"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "api"
          ],
          "x-enumNames": [
            "API"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepApiContentInput"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "function"
          ],
          "x-enumNames": [
            "FUNCTION"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepFunctionContentInput"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "integration"
          ],
          "x-enumNames": [
            "INTEGRATION"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepIntegrationContentInput"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "mcp"
          ],
          "x-enumNames": [
            "MCP"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepMcpContentInput"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "code"
          ],
          "x-enumNames": [
            "CODE"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepCodeContentInput"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "workflow"
          ],
          "x-enumNames": [
            "WORKFLOW"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepWorkflowContentInput"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "callForward"
          ],
          "x-enumNames": [
            "CALL_FORWARD"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepCallForwardContentInput"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "handoff"
          ],
          "x-enumNames": [
            "HANDOFF"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepHandoffContentInput"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "end"
          ],
          "x-enumNames": [
            "END"
          ]
        },
        "content": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StableWorkflowStepEndContentInput"
            }
          ]
        }
      },
      "required": [
        "kind"
      ],
      "additionalProperties": false
    }
  ]
}
```

### StableWorkflowPortActionRef

```json
{
  "type": "object",
  "properties": {
    "stepID": {
      "type": "string",
      "description": "The step, or the start node, whose exit runs this action."
    },
    "port": {
      "type": "string",
      "description": "The port key of that exit."
    },
    "index": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "description": "The position of the action in the list, from 0."
    }
  },
  "required": [
    "stepID",
    "port",
    "index"
  ]
}
```

### StableWorkflowPortActionsAddRequest

```json
{
  "type": "object",
  "properties": {
    "actions": {
      "minItems": 1,
      "maxItems": 10,
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowPortActionInput"
      },
      "description": "1 to 10 actions to add, in run order."
    },
    "afterActionID": {
      "description": "Add them after this action. Leave out afterActionID and atStart to add them at the end, before an action that ends the path.",
      "type": "string"
    },
    "atStart": {
      "description": "Add them before every other action on this exit.",
      "type": "boolean",
      "enum": [
        true
      ],
      "x-enumNames": [
        "TRUE"
      ]
    },
    "expectedActions": {
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The IDs in this exit's actions from your last read, in order. Send [] when it has none."
    },
    "to": {
      "description": "The block the path goes to after the actions. Leave it out to keep the current one. Send null to clear it.",
      "nullable": true,
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "actions",
    "expectedActions"
  ],
  "additionalProperties": false
}
```

### StableWorkflowPortActionsOrderResponse

```json
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "What was written."
    },
    "stepID": {
      "type": "string"
    },
    "port": {
      "type": "string"
    },
    "actions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The action IDs in their new order."
    },
    "to": {
      "nullable": true,
      "description": "The block the path reaches after the actions. Reordering keeps it.",
      "type": "string"
    }
  },
  "required": [
    "message",
    "stepID",
    "port",
    "actions",
    "to"
  ]
}
```

### StableWorkflowPortActionsReorderRequest

```json
{
  "type": "object",
  "properties": {
    "order": {
      "minItems": 2,
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Every action ID of this exit, in the new order."
    }
  },
  "required": [
    "order"
  ],
  "additionalProperties": false
}
```

### StableWorkflowPortActionsWriteResponse

```json
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "What was written."
    },
    "stepID": {
      "type": "string",
      "description": "The step that owns the exit, or the start node."
    },
    "port": {
      "type": "string"
    },
    "link": {
      "$ref": "#/components/schemas/StableWorkflowLink"
    },
    "clearedTo": {
      "description": "The block the exit continued to before this write. Dropped because the actions now end the path.",
      "type": "string"
    },
    "unresolvedReferences": {
      "description": "References this write kept as literal text instead of binding, each with the reason. The write still succeeded.",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableUnresolvedReference"
      }
    }
  },
  "required": [
    "message",
    "stepID",
    "port",
    "link"
  ]
}
```

### StableWorkflowRawReadResponse

```json
{
  "type": "object",
  "properties": {
    "workflow": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "diagramID": {
          "type": "string",
          "description": "The canvas the nodes belong to. A Go to block into this workflow names it."
        }
      },
      "required": [
        "id",
        "name",
        "diagramID"
      ]
    },
    "nodes": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "additionalProperties": {},
        "description": "One stored node: nodeID, type, coords when it has them, and data."
      },
      "description": "The stored nodes by ID: blocks, steps, the Start and action lists. A block lists its step IDs in data.steps, and ports keep their targets in data.portsV2. Text the canvas stores as rich text reads as a string, with {name} for a variable, entity or secret and `name` for a tool, playbook or workflow. Every other field is exactly as stored, and its shape can change without notice."
    },
    "missingBlockIDs": {
      "description": "IDs in blockIDs that name no block or Start in this workflow.",
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "workflow",
    "nodes"
  ]
}
```

### StableWorkflowReadListResponse

```json
{
  "type": "object",
  "properties": {
    "workflows": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowSummary"
      },
      "description": "Oldest first."
    },
    "nextCursor": {
      "description": "Present when more workflows follow. Send it as cursor.",
      "type": "string"
    }
  },
  "required": [
    "workflows"
  ]
}
```

### StableWorkflowReadResponse

```json
{
  "type": "object",
  "properties": {
    "workflow": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "nullable": true,
          "type": "string"
        },
        "counts": {
          "type": "object",
          "properties": {
            "blocks": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "steps": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "unreachableBlocks": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "danglingLinks": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "blocks",
            "steps",
            "unreachableBlocks",
            "danglingLinks"
          ]
        }
      },
      "required": [
        "id",
        "name",
        "description",
        "counts"
      ]
    },
    "entry": {
      "type": "object",
      "properties": {
        "stepID": {
          "type": "string",
          "description": "The start node."
        },
        "name": {
          "type": "string"
        },
        "next": {
          "nullable": true,
          "description": "The block the workflow starts in, or null. With actions, the block reached after the last action, or null when they end the path.",
          "type": "string"
        },
        "actions": {
          "description": "The port actions the start runs before next, in run order. Absent when there are none.",
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/StableWorkflowPortAction"
          }
        }
      },
      "required": [
        "stepID",
        "name",
        "next"
      ]
    },
    "blocks": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowBlock"
      },
      "description": "At most 50 blocks: breadth-first from the start, then blocks nothing reaches."
    },
    "orphanSteps": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowStep"
      },
      "description": "Steps that no block lists. They never run."
    },
    "warnings": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowDiagnostic"
      }
    },
    "truncated": {
      "description": "Present when more blocks follow. Send nextCursor as cursor to read the next page.",
      "type": "object",
      "properties": {
        "blocks": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "returned": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "nextCursor": {
          "type": "string"
        }
      },
      "required": [
        "blocks",
        "returned",
        "nextCursor"
      ]
    }
  },
  "required": [
    "workflow",
    "entry",
    "blocks",
    "orphanSteps",
    "warnings"
  ]
}
```

### StableWorkflowReconciledPorts

```json
{
  "type": "object",
  "properties": {
    "added": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Paths that exist on the agent or function but had no port on this step."
    },
    "removed": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ports whose path no longer exists. They are not shown."
    }
  },
  "required": [
    "added",
    "removed"
  ]
}
```

### StableWorkflowRemovalResponse

```json
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "What was deleted."
    },
    "removed": {
      "type": "object",
      "properties": {
        "blocks": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Blocks removed, including a block whose only step was removed."
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Steps removed, including actions on removed exits."
        }
      },
      "required": [
        "blocks",
        "steps"
      ]
    },
    "clearedLinks": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowInbound"
      },
      "description": "Exits of the steps that remain whose path led to a removed block or step. Each is now unlinked. An exit whose actions led there is named by its step and port."
    },
    "linksNowRunning": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "stepID": {
            "type": "string"
          },
          "port": {
            "type": "string"
          },
          "to": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "stepID",
          "port",
          "to"
        ]
      },
      "description": "Hidden links of a step that became the last step of its block. They did not run before the delete and run now, as on the canvas."
    }
  },
  "required": [
    "message",
    "removed",
    "clearedLinks",
    "linksNowRunning"
  ]
}
```

### StableWorkflowReplacedLink

```json
{
  "type": "object",
  "properties": {
    "stepID": {
      "type": "string",
      "description": "The step whose port the call re-pointed."
    },
    "port": {
      "type": "string",
      "description": "The port key, for example fail or a branch ID."
    },
    "to": {
      "type": "string",
      "description": "The block the port led to before this call. It no longer leads there."
    }
  },
  "required": [
    "stepID",
    "port",
    "to"
  ]
}
```

### StableWorkflowSeedBlock

```json
{
  "type": "object",
  "properties": {
    "key": {
      "$ref": "#/components/schemas/StableWorkflowSeedKey"
    },
    "name": {
      "type": "string",
      "maxLength": 255
    },
    "color": {
      "type": "string"
    },
    "steps": {
      "minItems": 1,
      "maxItems": 20,
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowStepInput"
      }
    }
  },
  "required": [
    "key",
    "name",
    "steps"
  ],
  "additionalProperties": false
}
```

### StableWorkflowSeedKey

```json
{
  "type": "string",
  "pattern": "^\\w{1,64}$",
  "description": "A name you choose for something this call creates, so the response can map it to the ID the server creates. Letters, digits and underscores, at most 64 characters, unique in the request."
}
```

### StableWorkflowSplitResponse

```json
{
  "type": "object",
  "properties": {
    "head": {
      "$ref": "#/components/schemas/StableWorkflowBlock"
    },
    "tail": {
      "$ref": "#/components/schemas/StableWorkflowBlock"
    },
    "clearedLinks": {
      "description": "Actions on the next exit of the head’s new last step that were deleted, because next now links to the new block. Its hidden links are kept and now run.",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowClearedLink"
      }
    }
  },
  "required": [
    "head",
    "tail"
  ]
}
```

### StableWorkflowStep

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "kind": {
      "$ref": "#/components/schemas/StableWorkflowStepKind"
    },
    "exitClass": {
      "$ref": "#/components/schemas/StableWorkflowExitClass"
    },
    "content": {
      "$ref": "#/components/schemas/StableWorkflowStepContent"
    },
    "fallsThroughTo": {
      "nullable": true,
      "description": "When the step is not the last of its block: the step it continues to. Otherwise null.",
      "type": "string"
    },
    "suppressedPorts": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ports that run into the next step instead of their link, because the step is not last."
    },
    "links": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowLink"
      }
    },
    "reconciledPorts": {
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowReconciledPorts"
        }
      ]
    },
    "warnings": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowDiagnostic"
      }
    }
  },
  "required": [
    "id",
    "kind",
    "exitClass",
    "content",
    "fallsThroughTo",
    "suppressedPorts",
    "links"
  ]
}
```

### StableWorkflowStepApiContent

```json
{
  "type": "object",
  "properties": {
    "apiToolID": {
      "type": "string"
    },
    "apiToolName": {
      "nullable": true,
      "description": "Read-only.",
      "type": "string"
    },
    "description": {
      "nullable": true,
      "type": "string"
    },
    "inputs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "description": {
            "default": null,
            "nullable": true,
            "type": "string"
          },
          "defaultValue": {
            "default": null,
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/DefaultValueString"
              }
            ]
          },
          "apiToolInputVariableID": {
            "type": "string"
          },
          "captureType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ToolNodeCaptureType"
              }
            ]
          },
          "required": {
            "type": "boolean",
            "description": "Whether the agent must supply a value for this input. Omit it and the API infers: false when defaultValue holds a secret reference (the secret is injected and the model is never asked for it), true otherwise. Sending true together with a secret defaultValue is rejected."
          }
        },
        "required": [
          "id",
          "apiToolInputVariableID",
          "required"
        ]
      }
    },
    "captureResponse": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "variableOrEntityID": {
            "nullable": true,
            "type": "string"
          },
          "captureType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ToolNodeCaptureType"
              }
            ]
          }
        },
        "required": [
          "id",
          "path",
          "variableOrEntityID"
        ]
      }
    },
    "failPath": {
      "type": "boolean",
      "description": "Whether the fail port is on: a failed call leaves through it."
    },
    "asyncExecution": {
      "type": "boolean",
      "description": "Read-only. When true, the path continues without waiting for the call to finish."
    }
  },
  "required": [
    "apiToolID",
    "apiToolName",
    "description",
    "inputs",
    "captureResponse",
    "failPath",
    "asyncExecution"
  ]
}
```

### StableWorkflowStepApiContentInput

```json
{
  "type": "object",
  "properties": {
    "apiToolID": {
      "type": "string"
    },
    "description": {
      "nullable": true,
      "type": "string"
    },
    "inputs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "description": {
            "default": null,
            "nullable": true,
            "type": "string"
          },
          "defaultValue": {
            "default": null,
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/DefaultValueString"
              }
            ]
          },
          "apiToolInputVariableID": {
            "type": "string"
          },
          "captureType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ToolNodeCaptureType"
              }
            ]
          },
          "required": {
            "type": "boolean",
            "description": "Whether the agent must supply a value for this input. Omit it and the API infers: false when defaultValue holds a secret reference (the secret is injected and the model is never asked for it), true otherwise. Sending true together with a secret defaultValue is rejected."
          },
          "id": {
            "description": "The id a read returned for this entry, to keep it; omit it for a new entry.",
            "type": "string"
          }
        },
        "required": [
          "apiToolInputVariableID"
        ]
      }
    },
    "captureResponse": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "A dot path from the top of the JSON response body, because the step already reads inside the body: \"order.status\" reads \"shipped\" from { \"order\": { \"status\": \"shipped\" } }. Add no wrapper the body does not have, such as data., body. or output."
          },
          "variableOrEntityID": {
            "nullable": true,
            "type": "string"
          },
          "captureType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ToolNodeCaptureType"
              }
            ]
          },
          "id": {
            "description": "The id a read returned for this entry, to keep it; omit it for a new entry.",
            "type": "string"
          }
        },
        "required": [
          "path",
          "variableOrEntityID"
        ]
      }
    },
    "failPath": {
      "description": "Adds the fail port, taken when the tool fails.",
      "type": "boolean"
    }
  },
  "required": [
    "apiToolID"
  ],
  "additionalProperties": false
}
```

### StableWorkflowStepApiContentPatch

```json
{
  "type": "object",
  "properties": {
    "apiToolID": {
      "type": "string"
    },
    "description": {
      "nullable": true,
      "type": "string"
    },
    "inputs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "description": {
            "default": null,
            "nullable": true,
            "type": "string"
          },
          "defaultValue": {
            "default": null,
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/DefaultValueString"
              }
            ]
          },
          "apiToolInputVariableID": {
            "type": "string"
          },
          "captureType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ToolNodeCaptureType"
              }
            ]
          },
          "required": {
            "type": "boolean",
            "description": "Whether the agent must supply a value for this input. Omit it and the API infers: false when defaultValue holds a secret reference (the secret is injected and the model is never asked for it), true otherwise. Sending true together with a secret defaultValue is rejected."
          },
          "id": {
            "description": "The id a read returned for this entry, to keep it; omit it for a new entry.",
            "type": "string"
          }
        },
        "required": [
          "apiToolInputVariableID"
        ]
      }
    },
    "captureResponse": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "A dot path from the top of the JSON response body, because the step already reads inside the body: \"order.status\" reads \"shipped\" from { \"order\": { \"status\": \"shipped\" } }. Add no wrapper the body does not have, such as data., body. or output."
          },
          "variableOrEntityID": {
            "nullable": true,
            "type": "string"
          },
          "captureType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ToolNodeCaptureType"
              }
            ]
          },
          "id": {
            "description": "The id a read returned for this entry, to keep it; omit it for a new entry.",
            "type": "string"
          }
        },
        "required": [
          "path",
          "variableOrEntityID"
        ]
      }
    },
    "failPath": {
      "type": "boolean"
    }
  },
  "additionalProperties": false
}
```

### StableWorkflowStepButtonsContent

```json
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "$ref": "#/components/schemas/VariableReferenceString"
          },
          "url": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/VariableReferenceString"
              }
            ]
          },
          "openInNewTab": {
            "description": "Read-only. Present when the button has a URL: true opens the URL in a new tab.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "label",
          "url"
        ]
      }
    },
    "noMatch": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowNoMatch"
        }
      ]
    },
    "noReply": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowNoReply"
        }
      ]
    },
    "listenForOtherTriggers": {
      "type": "boolean"
    }
  },
  "required": [
    "items",
    "noMatch",
    "noReply",
    "listenForOtherTriggers"
  ]
}
```

### StableWorkflowStepButtonsContentInput

```json
{
  "type": "object",
  "properties": {
    "items": {
      "maxItems": 20,
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowButtonInput"
      }
    },
    "noMatch": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowNoMatch"
        }
      ]
    },
    "noReply": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowNoReply"
        }
      ]
    },
    "listenForOtherTriggers": {
      "type": "boolean"
    }
  },
  "required": [
    "items"
  ],
  "additionalProperties": false
}
```

### StableWorkflowStepButtonsContentPatch

```json
{
  "type": "object",
  "properties": {
    "noMatch": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowNoMatch"
        }
      ]
    },
    "noReply": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowNoReply"
        }
      ]
    },
    "listenForOtherTriggers": {
      "type": "boolean"
    }
  },
  "additionalProperties": false
}
```

### StableWorkflowStepCallForwardContent

```json
{
  "type": "object",
  "properties": {
    "addressType": {
      "type": "string",
      "enum": [
        "phone",
        "sip"
      ],
      "description": "Whether address is a phone number or a SIP address.",
      "x-enumNames": [
        "PHONE",
        "SIP"
      ]
    },
    "address": {
      "$ref": "#/components/schemas/VariableReferenceString"
    },
    "extension": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      ]
    },
    "callerIDPassthrough": {
      "type": "boolean",
      "description": "Whether the forwarded call shows the caller's own number."
    }
  },
  "required": [
    "addressType",
    "address",
    "extension",
    "callerIDPassthrough"
  ],
  "description": "Forwards the call to a phone number or SIP address, then ends the path. address is the number or SIP address; extension is the digits dialled after the call connects, or null."
}
```

### StableWorkflowStepCallForwardContentInput

```json
{
  "type": "object",
  "properties": {
    "addressType": {
      "description": "phone (the default) or sip.",
      "type": "string",
      "enum": [
        "phone",
        "sip"
      ],
      "x-enumNames": [
        "PHONE",
        "SIP"
      ]
    },
    "address": {
      "$ref": "#/components/schemas/VariableReferenceString"
    },
    "extension": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      ]
    },
    "callerIDPassthrough": {
      "type": "boolean"
    }
  },
  "required": [
    "address"
  ],
  "additionalProperties": false,
  "description": "Call forward works only in a phone project. In a chat project, do not add it as a step or an action: tell the user it needs a phone project."
}
```

### StableWorkflowStepCallForwardContentPatch

```json
{
  "type": "object",
  "properties": {
    "addressType": {
      "type": "string",
      "enum": [
        "phone",
        "sip"
      ],
      "x-enumNames": [
        "PHONE",
        "SIP"
      ]
    },
    "address": {
      "allOf": [
        {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      ]
    },
    "extension": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      ]
    },
    "callerIDPassthrough": {
      "type": "boolean"
    }
  },
  "additionalProperties": false
}
```

### StableWorkflowStepCardContent

```json
{
  "type": "object",
  "properties": {
    "title": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      ]
    },
    "description": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/MarkdownLikeString"
        }
      ]
    },
    "imageUrl": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      ]
    },
    "buttons": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "$ref": "#/components/schemas/VariableReferenceString"
          },
          "url": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/VariableReferenceString"
              }
            ]
          },
          "openInNewTab": {
            "description": "Read-only. Present when the button has a URL: true opens the URL in a new tab.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "label",
          "url"
        ]
      }
    },
    "noMatch": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowNoMatch"
        }
      ]
    },
    "noReply": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowNoReply"
        }
      ]
    }
  },
  "required": [
    "title",
    "description",
    "imageUrl",
    "buttons",
    "noMatch",
    "noReply"
  ]
}
```

### StableWorkflowStepCardContentInput

```json
{
  "type": "object",
  "properties": {
    "title": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      ]
    },
    "description": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/MarkdownLikeString"
        }
      ]
    },
    "imageUrl": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      ]
    },
    "buttons": {
      "maxItems": 20,
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowButtonInput"
      }
    },
    "noMatch": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowNoMatch"
        }
      ]
    },
    "noReply": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowNoReply"
        }
      ]
    }
  },
  "additionalProperties": false
}
```

### StableWorkflowStepCardContentPatch

```json
{
  "type": "object",
  "properties": {
    "title": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      ]
    },
    "description": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/MarkdownLikeString"
        }
      ]
    },
    "imageUrl": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      ]
    },
    "noMatch": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowNoMatch"
        }
      ]
    },
    "noReply": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowNoReply"
        }
      ]
    }
  },
  "additionalProperties": false
}
```

### StableWorkflowStepCarouselContent

```json
{
  "type": "object",
  "properties": {
    "layout": {
      "type": "string",
      "enum": [
        "List",
        "Carousel"
      ],
      "x-enumNames": [
        "LIST",
        "CAROUSEL"
      ]
    },
    "cards": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/VariableReferenceString"
              }
            ]
          },
          "description": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/MarkdownLikeString"
              }
            ]
          },
          "imageUrl": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/VariableReferenceString"
              }
            ]
          },
          "buttons": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "label": {
                  "$ref": "#/components/schemas/VariableReferenceString"
                },
                "url": {
                  "nullable": true,
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/VariableReferenceString"
                    }
                  ]
                },
                "openInNewTab": {
                  "description": "Read-only. Present when the button has a URL: true opens the URL in a new tab.",
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "label",
                "url"
              ]
            }
          }
        },
        "required": [
          "id",
          "title",
          "description",
          "imageUrl",
          "buttons"
        ]
      }
    },
    "noMatch": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowNoMatch"
        }
      ]
    },
    "noReply": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowNoReply"
        }
      ]
    }
  },
  "required": [
    "layout",
    "cards",
    "noMatch",
    "noReply"
  ]
}
```

### StableWorkflowStepCarouselContentInput

```json
{
  "type": "object",
  "properties": {
    "layout": {
      "allOf": [
        {
          "$ref": "#/components/schemas/CarouselV2NodeLayout"
        }
      ]
    },
    "cards": {
      "minItems": 1,
      "maxItems": 20,
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowCarouselCardInput"
      }
    },
    "noMatch": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowNoMatch"
        }
      ]
    },
    "noReply": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowNoReply"
        }
      ]
    }
  },
  "required": [
    "cards"
  ],
  "additionalProperties": false
}
```

### StableWorkflowStepCarouselContentPatch

```json
{
  "type": "object",
  "properties": {
    "layout": {
      "allOf": [
        {
          "$ref": "#/components/schemas/CarouselV2NodeLayout"
        }
      ]
    },
    "cards": {
      "description": "Text changes for existing cards, by card ID. Cards not listed keep their text.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of an existing card."
          },
          "title": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/VariableReferenceString"
              }
            ]
          },
          "description": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/MarkdownLikeString"
              }
            ]
          },
          "imageUrl": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/VariableReferenceString"
              }
            ]
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      }
    },
    "noMatch": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowNoMatch"
        }
      ]
    },
    "noReply": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowNoReply"
        }
      ]
    }
  },
  "additionalProperties": false
}
```

### StableWorkflowStepCodeContent

```json
{
  "type": "object",
  "properties": {
    "code": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      ]
    },
    "paths": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "label"
        ]
      }
    },
    "fallback": {
      "type": "boolean",
      "description": "Whether the fail port is on: an error in the code leaves through it."
    }
  },
  "required": [
    "code",
    "paths",
    "fallback"
  ]
}
```

### StableWorkflowStepCodeContentInput

```json
{
  "type": "object",
  "properties": {
    "code": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      ]
    },
    "paths": {
      "maxItems": 20,
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowCodePathInput"
      }
    },
    "fallback": {
      "description": "Adds the fail port, taken when the code throws.",
      "type": "boolean"
    }
  },
  "required": [
    "code"
  ],
  "additionalProperties": false
}
```

### StableWorkflowStepCodeContentPatch

```json
{
  "type": "object",
  "properties": {
    "code": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/VariableReferenceString"
        }
      ]
    },
    "fallback": {
      "type": "boolean"
    }
  },
  "additionalProperties": false
}
```

### StableWorkflowStepConditionContent

```json
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The branch ID, which is also its port key."
          },
          "label": {
            "nullable": true,
            "type": "string"
          },
          "matchAll": {
            "type": "boolean"
          },
          "assertions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The assertion's ID. Send it back with the assertion in a write to keep it."
                },
                "lhs": {
                  "type": "object",
                  "properties": {
                    "variableID": {
                      "nullable": true,
                      "type": "string"
                    },
                    "path": {
                      "nullable": true,
                      "type": "string"
                    }
                  },
                  "required": [
                    "variableID",
                    "path"
                  ]
                },
                "operation": {
                  "$ref": "#/components/schemas/ConditionOperation"
                },
                "rhs": {
                  "$ref": "#/components/schemas/VariableReferenceString"
                }
              },
              "required": [
                "id",
                "lhs",
                "operation",
                "rhs"
              ]
            }
          }
        },
        "required": [
          "id",
          "label",
          "matchAll",
          "assertions"
        ]
      }
    },
    "elsePath": {
      "type": "boolean",
      "description": "Whether the else port is on: a reply that matches no branch leaves through it."
    },
    "elseReprompt": {
      "nullable": true,
      "type": "object",
      "properties": {
        "repromptID": {
          "nullable": true,
          "type": "string"
        }
      },
      "required": [
        "repromptID"
      ]
    }
  },
  "required": [
    "items",
    "elsePath",
    "elseReprompt"
  ]
}
```

### StableWorkflowStepConditionContentInput

```json
{
  "type": "object",
  "properties": {
    "items": {
      "maxItems": 20,
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowConditionItemInput"
      }
    },
    "elsePath": {
      "type": "boolean"
    },
    "elseReprompt": {
      "nullable": true,
      "type": "object",
      "properties": {
        "repromptID": {
          "nullable": true,
          "type": "string"
        }
      },
      "required": [
        "repromptID"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "items"
  ],
  "additionalProperties": false
}
```

### StableWorkflowStepConditionContentPatch

```json
{
  "type": "object",
  "properties": {
    "elsePath": {
      "type": "boolean"
    },
    "elseReprompt": {
      "nullable": true,
      "type": "object",
      "properties": {
        "repromptID": {
          "nullable": true,
          "type": "string"
        }
      },
      "required": [
        "repromptID"
      ],
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
```

### StableWorkflowStepContent

```json
{
  "anyOf": [
    {
      "$ref": "#/components/schemas/StableWorkflowStepMessageContent"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowStepEndContent"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowStepSetContent"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowStepWorkflowContent"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowStepListenContent"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowStepConditionContent"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowStepButtonsContent"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowStepCardContent"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowStepCarouselContent"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowStepCodeContent"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowStepApiContent"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowStepFunctionContent"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowStepIntegrationContent"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowStepMcpContent"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowStepOperatorContent"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowStepPlaybookContent"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowStepCrewContent"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowStepHandoffContent"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowStepGoToBlockContent"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowStepCallForwardContent"
    },
    {
      "$ref": "#/components/schemas/StableWorkflowStepReadOnlyContent"
    }
  ],
  "description": "The step's settings, shaped by its kind. A step these operations cannot show reads as readOnly."
}
```

### StableWorkflowStepCrewContent

```json
{
  "type": "object",
  "properties": {
    "rootAgent": {
      "nullable": true,
      "type": "object",
      "properties": {
        "agentID": {
          "type": "string"
        },
        "description": {
          "nullable": true,
          "type": "string"
        },
        "condition": {
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/components/schemas/StableExpressionCondition"
            }
          ]
        },
        "requiredVariables": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "description": {
                "nullable": true,
                "type": "string"
              },
              "variableOrEntityID": {
                "nullable": true,
                "type": "string"
              }
            },
            "required": [
              "id",
              "description",
              "variableOrEntityID"
            ]
          }
        }
      },
      "required": [
        "agentID",
        "description",
        "condition",
        "requiredVariables"
      ]
    },
    "subAgents": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "agentID": {
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "condition": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/StableExpressionCondition"
              }
            ]
          },
          "requiredVariables": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "description": {
                  "nullable": true,
                  "type": "string"
                },
                "variableOrEntityID": {
                  "nullable": true,
                  "type": "string"
                }
              },
              "required": [
                "id",
                "description",
                "variableOrEntityID"
              ]
            }
          }
        },
        "required": [
          "agentID",
          "description",
          "condition",
          "requiredVariables"
        ]
      }
    },
    "subFlows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "flowID": {
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "condition": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/StableExpressionCondition"
              }
            ]
          },
          "requiredVariables": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "description": {
                  "nullable": true,
                  "type": "string"
                },
                "variableOrEntityID": {
                  "nullable": true,
                  "type": "string"
                }
              },
              "required": [
                "id",
                "description",
                "variableOrEntityID"
              ]
            }
          }
        },
        "required": [
          "flowID",
          "description",
          "condition",
          "requiredVariables"
        ]
      }
    },
    "exitPaths": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The exit path ID, which is also its port key."
          },
          "name": {
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "requiredVariables": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "description": {
                  "nullable": true,
                  "type": "string"
                },
                "variableOrEntityID": {
                  "nullable": true,
                  "type": "string"
                }
              },
              "required": [
                "id",
                "description",
                "variableOrEntityID"
              ]
            }
          },
          "messages": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/StableWorkflowCrewExitMessages"
              }
            ]
          },
          "delayMessageSeconds": {
            "nullable": true,
            "type": "number"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "requiredVariables",
          "messages",
          "delayMessageSeconds"
        ]
      }
    },
    "listenForOtherTriggers": {
      "type": "boolean"
    },
    "waitForUserResponse": {
      "type": "boolean"
    }
  },
  "required": [
    "rootAgent",
    "subAgents",
    "subFlows",
    "exitPaths",
    "listenForOtherTriggers",
    "waitForUserResponse"
  ]
}
```

### StableWorkflowStepCrewContentInput

```json
{
  "type": "object",
  "properties": {
    "rootAgent": {
      "nullable": true,
      "type": "object",
      "properties": {
        "agentID": {
          "type": "string"
        },
        "description": {
          "nullable": true,
          "type": "string"
        },
        "condition": {
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/components/schemas/StableExpressionCondition"
            }
          ]
        },
        "requiredVariables": {
          "description": "Replaces the stored list. Leave it out to keep the stored required variables.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "description": {
                "nullable": true,
                "type": "string"
              },
              "variableOrEntityID": {
                "nullable": true,
                "type": "string"
              }
            },
            "required": [
              "variableOrEntityID"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "agentID"
      ],
      "additionalProperties": false
    },
    "subAgents": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "agentID": {
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "condition": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/StableExpressionCondition"
              }
            ]
          },
          "requiredVariables": {
            "description": "Replaces the stored list. Leave it out to keep the stored required variables.",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "nullable": true,
                  "type": "string"
                },
                "variableOrEntityID": {
                  "nullable": true,
                  "type": "string"
                }
              },
              "required": [
                "variableOrEntityID"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "agentID"
        ],
        "additionalProperties": false
      }
    },
    "subFlows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "flowID": {
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "condition": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/StableExpressionCondition"
              }
            ]
          },
          "requiredVariables": {
            "description": "Replaces the stored list. Leave it out to keep the stored required variables.",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "nullable": true,
                  "type": "string"
                },
                "variableOrEntityID": {
                  "nullable": true,
                  "type": "string"
                }
              },
              "required": [
                "variableOrEntityID"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "flowID"
        ],
        "additionalProperties": false
      }
    },
    "exitPaths": {
      "maxItems": 20,
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowCrewExitPathInput"
      }
    },
    "listenForOtherTriggers": {
      "type": "boolean"
    },
    "waitForUserResponse": {
      "type": "boolean"
    }
  },
  "required": [
    "rootAgent"
  ],
  "additionalProperties": false
}
```

### StableWorkflowStepCrewContentPatch

```json
{
  "type": "object",
  "properties": {
    "rootAgent": {
      "nullable": true,
      "type": "object",
      "properties": {
        "agentID": {
          "type": "string"
        },
        "description": {
          "nullable": true,
          "type": "string"
        },
        "condition": {
          "nullable": true,
          "allOf": [
            {
              "$ref": "#/components/schemas/StableExpressionCondition"
            }
          ]
        },
        "requiredVariables": {
          "description": "Replaces the stored list. Leave it out to keep the stored required variables.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "description": {
                "nullable": true,
                "type": "string"
              },
              "variableOrEntityID": {
                "nullable": true,
                "type": "string"
              }
            },
            "required": [
              "variableOrEntityID"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "agentID"
      ],
      "additionalProperties": false
    },
    "subAgents": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "agentID": {
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "condition": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/StableExpressionCondition"
              }
            ]
          },
          "requiredVariables": {
            "description": "Replaces the stored list. Leave it out to keep the stored required variables.",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "nullable": true,
                  "type": "string"
                },
                "variableOrEntityID": {
                  "nullable": true,
                  "type": "string"
                }
              },
              "required": [
                "variableOrEntityID"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "agentID"
        ],
        "additionalProperties": false
      }
    },
    "subFlows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "flowID": {
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "condition": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/StableExpressionCondition"
              }
            ]
          },
          "requiredVariables": {
            "description": "Replaces the stored list. Leave it out to keep the stored required variables.",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "nullable": true,
                  "type": "string"
                },
                "variableOrEntityID": {
                  "nullable": true,
                  "type": "string"
                }
              },
              "required": [
                "variableOrEntityID"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "flowID"
        ],
        "additionalProperties": false
      }
    },
    "exitPaths": {
      "description": "Message and delay changes for existing exit paths, by ID.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of an existing exit path."
          },
          "messages": {
            "type": "object",
            "properties": {
              "execution": {
                "nullable": true,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/StableToolMessageRequest"
                  }
                ]
              },
              "failure": {
                "nullable": true,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/StableToolMessageRequest"
                  }
                ]
              },
              "delay": {
                "nullable": true,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/StableToolMessageRequest"
                  }
                ]
              },
              "completion": {
                "nullable": true,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/StableToolMessageRequest"
                  }
                ]
              }
            },
            "additionalProperties": false,
            "description": "One message per slot. null clears the slot; a slot you leave out keeps its message."
          },
          "delayMessageSeconds": {
            "nullable": true,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      }
    },
    "listenForOtherTriggers": {
      "type": "boolean"
    },
    "waitForUserResponse": {
      "type": "boolean"
    }
  },
  "additionalProperties": false
}
```

### StableWorkflowStepEndContent

```json
{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "responseType": {
          "type": "string",
          "enum": [
            "message"
          ],
          "x-enumNames": [
            "MESSAGE"
          ]
        },
        "messageID": {
          "nullable": true,
          "description": "The ID of the message this step says, or null. Read its words with the message operations.",
          "type": "string"
        },
        "responseEnabled": {
          "type": "boolean",
          "description": "Whether the step says something before it ends the conversation."
        }
      },
      "required": [
        "responseType",
        "messageID",
        "responseEnabled"
      ]
    },
    {
      "type": "object",
      "properties": {
        "responseType": {
          "type": "string",
          "enum": [
            "prompt"
          ],
          "x-enumNames": [
            "PROMPT"
          ]
        },
        "promptID": {
          "nullable": true,
          "description": "The ID of the prompt this step runs, or null. Read it with the prompt operations.",
          "type": "string"
        },
        "responseEnabled": {
          "type": "boolean",
          "description": "Whether the step says something before it ends the conversation."
        }
      },
      "required": [
        "responseType",
        "promptID",
        "responseEnabled"
      ]
    }
  ]
}
```

### StableWorkflowStepEndContentInput

```json
{
  "type": "object",
  "properties": {
    "responseType": {
      "description": "message or prompt. Defaults to the kind of ID you send.",
      "type": "string",
      "enum": [
        "message",
        "prompt"
      ],
      "x-enumNames": [
        "MESSAGE",
        "PROMPT"
      ]
    },
    "messageID": {
      "description": "A message ID from voiceflow_message.create_many, said before the conversation ends.",
      "nullable": true,
      "type": "string"
    },
    "promptID": {
      "description": "A prompt ID from voiceflow_prompt.create, run before the conversation ends.",
      "nullable": true,
      "type": "string"
    },
    "responseEnabled": {
      "description": "Whether the End says its message or prompt. Defaults to true when you send an ID.",
      "type": "boolean"
    }
  },
  "additionalProperties": false,
  "description": "Leave out content for an End that says nothing: { \"kind\": \"end\" }. In a block, say something first with a Message step before the End. An End action on an exit can speak itself: send one messageID or promptID."
}
```

### StableWorkflowStepEndContentPatch

```json
{
  "type": "object",
  "properties": {
    "responseType": {
      "type": "string",
      "enum": [
        "message",
        "prompt"
      ],
      "x-enumNames": [
        "MESSAGE",
        "PROMPT"
      ]
    },
    "messageID": {
      "nullable": true,
      "type": "string"
    },
    "promptID": {
      "nullable": true,
      "type": "string"
    },
    "responseEnabled": {
      "type": "boolean"
    }
  },
  "additionalProperties": false
}
```

### StableWorkflowStepFunctionContent

```json
{
  "type": "object",
  "properties": {
    "functionID": {
      "type": "string"
    },
    "functionName": {
      "nullable": true,
      "description": "Read-only.",
      "type": "string"
    },
    "paths": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "label"
        ]
      },
      "description": "Read-only. The function's paths; each is also a port key of this step."
    },
    "description": {
      "nullable": true,
      "type": "string"
    },
    "inputs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "description": {
            "default": null,
            "nullable": true,
            "type": "string"
          },
          "defaultValue": {
            "default": null,
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/DefaultValueString"
              }
            ]
          },
          "functionInputVariableID": {
            "type": "string"
          },
          "captureType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ToolNodeCaptureType"
              }
            ]
          },
          "required": {
            "type": "boolean",
            "description": "Whether the agent must supply a value for this input. Omit it and the API infers: false when defaultValue holds a secret reference (the secret is injected and the model is never asked for it), true otherwise. Sending true together with a secret defaultValue is rejected."
          }
        },
        "required": [
          "id",
          "functionInputVariableID",
          "required"
        ]
      }
    },
    "captureResponse": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "variableOrEntityID": {
            "nullable": true,
            "type": "string"
          },
          "functionOutputVariableID": {
            "type": "string"
          },
          "captureType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ToolNodeCaptureType"
              }
            ]
          }
        },
        "required": [
          "id",
          "variableOrEntityID",
          "functionOutputVariableID"
        ]
      }
    },
    "failPath": {
      "type": "boolean",
      "description": "Whether the fail port is on: a failed call leaves through it."
    },
    "asyncExecution": {
      "type": "boolean",
      "description": "Read-only. When true, the path continues without waiting for the call to finish."
    }
  },
  "required": [
    "functionID",
    "functionName",
    "paths",
    "description",
    "inputs",
    "captureResponse",
    "failPath",
    "asyncExecution"
  ]
}
```

### StableWorkflowStepFunctionContentInput

```json
{
  "type": "object",
  "properties": {
    "functionID": {
      "type": "string"
    },
    "description": {
      "nullable": true,
      "type": "string"
    },
    "inputs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "description": {
            "default": null,
            "nullable": true,
            "type": "string"
          },
          "defaultValue": {
            "default": null,
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/DefaultValueString"
              }
            ]
          },
          "functionInputVariableID": {
            "type": "string"
          },
          "captureType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ToolNodeCaptureType"
              }
            ]
          },
          "required": {
            "type": "boolean",
            "description": "Whether the agent must supply a value for this input. Omit it and the API infers: false when defaultValue holds a secret reference (the secret is injected and the model is never asked for it), true otherwise. Sending true together with a secret defaultValue is rejected."
          },
          "id": {
            "description": "The id a read returned for this entry, to keep it; omit it for a new entry.",
            "type": "string"
          }
        },
        "required": [
          "functionInputVariableID"
        ]
      }
    },
    "captureResponse": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "variableOrEntityID": {
            "nullable": true,
            "type": "string"
          },
          "functionOutputVariableID": {
            "type": "string"
          },
          "captureType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ToolNodeCaptureType"
              }
            ]
          },
          "id": {
            "description": "The id a read returned for this entry, to keep it; omit it for a new entry.",
            "type": "string"
          }
        },
        "required": [
          "variableOrEntityID",
          "functionOutputVariableID"
        ]
      }
    },
    "failPath": {
      "description": "Adds the fail port, taken when the tool fails.",
      "type": "boolean"
    }
  },
  "required": [
    "functionID"
  ],
  "additionalProperties": false
}
```

### StableWorkflowStepFunctionContentPatch

```json
{
  "type": "object",
  "properties": {
    "functionID": {
      "type": "string"
    },
    "description": {
      "nullable": true,
      "type": "string"
    },
    "inputs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "description": {
            "default": null,
            "nullable": true,
            "type": "string"
          },
          "defaultValue": {
            "default": null,
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/DefaultValueString"
              }
            ]
          },
          "functionInputVariableID": {
            "type": "string"
          },
          "captureType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ToolNodeCaptureType"
              }
            ]
          },
          "required": {
            "type": "boolean",
            "description": "Whether the agent must supply a value for this input. Omit it and the API infers: false when defaultValue holds a secret reference (the secret is injected and the model is never asked for it), true otherwise. Sending true together with a secret defaultValue is rejected."
          },
          "id": {
            "description": "The id a read returned for this entry, to keep it; omit it for a new entry.",
            "type": "string"
          }
        },
        "required": [
          "functionInputVariableID"
        ]
      }
    },
    "captureResponse": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "variableOrEntityID": {
            "nullable": true,
            "type": "string"
          },
          "functionOutputVariableID": {
            "type": "string"
          },
          "captureType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ToolNodeCaptureType"
              }
            ]
          },
          "id": {
            "description": "The id a read returned for this entry, to keep it; omit it for a new entry.",
            "type": "string"
          }
        },
        "required": [
          "variableOrEntityID",
          "functionOutputVariableID"
        ]
      }
    },
    "failPath": {
      "type": "boolean"
    }
  },
  "additionalProperties": false
}
```

### StableWorkflowStepGoToBlockContent

```json
{
  "type": "object",
  "properties": {
    "targetWorkflowID": {
      "nullable": true,
      "description": "The workflow the path jumps to, by its workflow ID. It is this workflow when the target is in it. Null when that workflow no longer exists; the step then carries a GO_TO_TARGET_MISSING warning.",
      "type": "string"
    },
    "targetWorkflowName": {
      "nullable": true,
      "description": "Read-only. The name of that workflow.",
      "type": "string"
    },
    "targetBlockID": {
      "nullable": true,
      "description": "The block the path jumps to, or the target workflow's start step ID.",
      "type": "string"
    }
  },
  "required": [
    "targetWorkflowID",
    "targetWorkflowName",
    "targetBlockID"
  ]
}
```

### StableWorkflowStepGoToBlockContentInput

```json
{
  "type": "object",
  "properties": {
    "targetBlockID": {
      "type": "string",
      "description": "A block ID, or the Start step ID of the target workflow. Never a step inside a block."
    },
    "targetWorkflowID": {
      "description": "The workflow that holds the block, from voiceflow_workflow.list. Leave it out for this workflow.",
      "type": "string"
    }
  },
  "required": [
    "targetBlockID"
  ],
  "additionalProperties": false
}
```

### StableWorkflowStepGoToBlockContentPatch

```json
{
  "type": "object",
  "properties": {
    "targetBlockID": {
      "type": "string"
    },
    "targetWorkflowID": {
      "description": "Send targetBlockID with it: a block ID belongs to one workflow. A targetBlockID sent without it names a block of this workflow.",
      "type": "string"
    }
  },
  "additionalProperties": false
}
```

### StableWorkflowStepHandoffContent

```json
{
  "type": "object",
  "properties": {
    "config": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowHandoffConfig"
        }
      ]
    },
    "handoffContext": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "full",
            "none",
            "custom"
          ],
          "x-enumNames": [
            "FULL",
            "NONE",
            "CUSTOM"
          ]
        },
        "variableID": {
          "nullable": true,
          "type": "string"
        }
      },
      "required": [
        "type",
        "variableID"
      ]
    },
    "returnPath": {
      "type": "boolean",
      "description": "Whether the step continues through its next port when the agent hands the conversation back."
    },
    "failPath": {
      "type": "boolean",
      "description": "Whether the step continues through its fail port when the handoff cannot start."
    }
  },
  "required": [
    "config",
    "handoffContext",
    "returnPath",
    "failPath"
  ]
}
```

### StableWorkflowStepHandoffContentInput

```json
{
  "type": "object",
  "properties": {
    "config": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowHandoffConfigInput"
        }
      ]
    },
    "handoffContext": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/components/schemas/LiveAgentHandoffContextType"
        },
        "variableID": {
          "nullable": true,
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "additionalProperties": false
    },
    "returnPath": {
      "description": "Adds the next port, taken when the conversation returns from the agent.",
      "type": "boolean"
    },
    "failPath": {
      "description": "Adds a fail port, taken when the handoff cannot start. Set it only when the user says what happens then. Link the port in the same call to the block that runs then, or leave it unlinked to hand the conversation back to the agent.",
      "type": "boolean"
    }
  },
  "additionalProperties": false
}
```

### StableWorkflowStepHandoffContentPatch

```json
{
  "type": "object",
  "properties": {
    "config": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowHandoffConfigInput"
        }
      ]
    },
    "handoffContext": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/components/schemas/LiveAgentHandoffContextType"
        },
        "variableID": {
          "nullable": true,
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "additionalProperties": false
    },
    "returnPath": {
      "type": "boolean"
    },
    "failPath": {
      "type": "boolean"
    }
  },
  "additionalProperties": false
}
```

### StableWorkflowStepInput

```json
{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "message"
          ],
          "x-enumNames": [
            "MESSAGE"
          ]
        },
        "key": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StableWorkflowSeedKey"
            }
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepMessageContentInput"
        },
        "links": {
          "description": "Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own `to`.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "end"
          ],
          "x-enumNames": [
            "END"
          ]
        },
        "key": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StableWorkflowSeedKey"
            }
          ]
        },
        "content": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StableWorkflowStepEndContentInput"
            }
          ]
        },
        "links": {
          "description": "Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own `to`.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "kind"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "set"
          ],
          "x-enumNames": [
            "SET"
          ]
        },
        "key": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StableWorkflowSeedKey"
            }
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepSetContentInput"
        },
        "links": {
          "description": "Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own `to`.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "workflow"
          ],
          "x-enumNames": [
            "WORKFLOW"
          ]
        },
        "key": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StableWorkflowSeedKey"
            }
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepWorkflowContentInput"
        },
        "links": {
          "description": "Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own `to`.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "listen"
          ],
          "x-enumNames": [
            "LISTEN"
          ]
        },
        "key": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StableWorkflowSeedKey"
            }
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepListenContentInput"
        },
        "links": {
          "description": "Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own `to`.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "condition"
          ],
          "x-enumNames": [
            "CONDITION"
          ]
        },
        "key": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StableWorkflowSeedKey"
            }
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepConditionContentInput"
        },
        "links": {
          "description": "Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own `to`.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "buttons"
          ],
          "x-enumNames": [
            "BUTTONS"
          ]
        },
        "key": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StableWorkflowSeedKey"
            }
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepButtonsContentInput"
        },
        "links": {
          "description": "Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own `to`.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "card"
          ],
          "x-enumNames": [
            "CARD"
          ]
        },
        "key": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StableWorkflowSeedKey"
            }
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepCardContentInput"
        },
        "links": {
          "description": "Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own `to`.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "carousel"
          ],
          "x-enumNames": [
            "CAROUSEL"
          ]
        },
        "key": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StableWorkflowSeedKey"
            }
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepCarouselContentInput"
        },
        "links": {
          "description": "Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own `to`.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "code"
          ],
          "x-enumNames": [
            "CODE"
          ]
        },
        "key": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StableWorkflowSeedKey"
            }
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepCodeContentInput"
        },
        "links": {
          "description": "Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own `to`.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "api"
          ],
          "x-enumNames": [
            "API"
          ]
        },
        "key": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StableWorkflowSeedKey"
            }
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepApiContentInput"
        },
        "links": {
          "description": "Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own `to`.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "function"
          ],
          "x-enumNames": [
            "FUNCTION"
          ]
        },
        "key": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StableWorkflowSeedKey"
            }
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepFunctionContentInput"
        },
        "links": {
          "description": "Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own `to`.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "integration"
          ],
          "x-enumNames": [
            "INTEGRATION"
          ]
        },
        "key": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StableWorkflowSeedKey"
            }
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepIntegrationContentInput"
        },
        "links": {
          "description": "Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own `to`.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "mcp"
          ],
          "x-enumNames": [
            "MCP"
          ]
        },
        "key": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StableWorkflowSeedKey"
            }
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepMcpContentInput"
        },
        "links": {
          "description": "Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own `to`.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "playbook"
          ],
          "x-enumNames": [
            "PLAYBOOK"
          ]
        },
        "key": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StableWorkflowSeedKey"
            }
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepPlaybookContentInput"
        },
        "links": {
          "description": "Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own `to`.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "operator"
          ],
          "x-enumNames": [
            "OPERATOR"
          ]
        },
        "key": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StableWorkflowSeedKey"
            }
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepOperatorContentInput"
        },
        "links": {
          "description": "Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own `to`.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "crew"
          ],
          "x-enumNames": [
            "CREW"
          ]
        },
        "key": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StableWorkflowSeedKey"
            }
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepCrewContentInput"
        },
        "links": {
          "description": "Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own `to`.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "handoff"
          ],
          "x-enumNames": [
            "HANDOFF"
          ]
        },
        "key": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StableWorkflowSeedKey"
            }
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepHandoffContentInput"
        },
        "links": {
          "description": "Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own `to`.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "callForward"
          ],
          "x-enumNames": [
            "CALL_FORWARD"
          ]
        },
        "key": {
          "allOf": [
            {
              "$ref": "#/components/schemas/StableWorkflowSeedKey"
            }
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepCallForwardContentInput"
        },
        "links": {
          "description": "Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own `to`.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    }
  ]
}
```

### StableWorkflowStepInsertRequest

```json
{
  "type": "object",
  "properties": {
    "afterStepID": {
      "description": "Insert right after this step of the block. Send this or atStart.",
      "type": "string"
    },
    "atStart": {
      "description": "Insert as the first step of the block. Send this or afterStepID.",
      "type": "boolean",
      "enum": [
        true
      ],
      "x-enumNames": [
        "TRUE"
      ]
    },
    "step": {
      "$ref": "#/components/schemas/StableWorkflowStepInput"
    },
    "expectedSteps": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The block's step IDs exactly as your last read returned them. If the block changed, nothing is written."
    },
    "acknowledgeRewire": {
      "description": "Required when the insert makes the last step stop being last and that step has exits that would stop running: a Tool or Code fail or path link is cleared, and actions on such an exit are deleted. Also required when you append a step that has no next port, such as End or Go to block: the old last step's next link cannot move to it, so it is cleared.",
      "type": "boolean"
    }
  },
  "required": [
    "step",
    "expectedSteps"
  ],
  "additionalProperties": false
}
```

### StableWorkflowStepIntegrationContent

```json
{
  "type": "object",
  "properties": {
    "integrationToolID": {
      "type": "string"
    },
    "integrationToolName": {
      "nullable": true,
      "description": "Read-only.",
      "type": "string"
    },
    "description": {
      "nullable": true,
      "type": "string"
    },
    "inputs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "description": {
            "default": null,
            "nullable": true,
            "type": "string"
          },
          "defaultValue": {
            "default": null,
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/DefaultValueString"
              }
            ]
          },
          "integrationToolVariableName": {
            "type": "string"
          },
          "captureType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ToolNodeCaptureType"
              }
            ]
          },
          "required": {
            "type": "boolean",
            "description": "Whether the agent must supply a value for this input. Omit it and the API infers: false when defaultValue holds a secret reference (the secret is injected and the model is never asked for it), true otherwise. Sending true together with a secret defaultValue is rejected."
          }
        },
        "required": [
          "id",
          "integrationToolVariableName",
          "required"
        ]
      }
    },
    "captureResponse": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "variableOrEntityID": {
            "nullable": true,
            "type": "string"
          },
          "captureType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ToolNodeCaptureType"
              }
            ]
          }
        },
        "required": [
          "id",
          "path",
          "variableOrEntityID"
        ]
      }
    }
  },
  "required": [
    "integrationToolID",
    "integrationToolName",
    "description",
    "inputs",
    "captureResponse"
  ]
}
```

### StableWorkflowStepIntegrationContentInput

```json
{
  "type": "object",
  "properties": {
    "integrationToolID": {
      "type": "string"
    },
    "description": {
      "nullable": true,
      "type": "string"
    },
    "inputs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "description": {
            "default": null,
            "nullable": true,
            "type": "string"
          },
          "defaultValue": {
            "default": null,
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/DefaultValueString"
              }
            ]
          },
          "integrationToolVariableName": {
            "type": "string"
          },
          "captureType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ToolNodeCaptureType"
              }
            ]
          },
          "required": {
            "type": "boolean",
            "description": "Whether the agent must supply a value for this input. Omit it and the API infers: false when defaultValue holds a secret reference (the secret is injected and the model is never asked for it), true otherwise. Sending true together with a secret defaultValue is rejected."
          },
          "id": {
            "description": "The id a read returned for this entry, to keep it; omit it for a new entry.",
            "type": "string"
          }
        },
        "required": [
          "integrationToolVariableName"
        ]
      }
    },
    "captureResponse": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "A dot path from the top of what the tool returns, because the step already reads inside it: \"order.status\" reads \"shipped\" from { \"order\": { \"status\": \"shipped\" } }. Add no wrapper it does not have, such as data., body. or output."
          },
          "variableOrEntityID": {
            "nullable": true,
            "type": "string"
          },
          "captureType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ToolNodeCaptureType"
              }
            ]
          },
          "id": {
            "description": "The id a read returned for this entry, to keep it; omit it for a new entry.",
            "type": "string"
          }
        },
        "required": [
          "path",
          "variableOrEntityID"
        ]
      }
    }
  },
  "required": [
    "integrationToolID"
  ],
  "additionalProperties": false
}
```

### StableWorkflowStepIntegrationContentPatch

```json
{
  "type": "object",
  "properties": {
    "integrationToolID": {
      "type": "string"
    },
    "description": {
      "nullable": true,
      "type": "string"
    },
    "inputs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "description": {
            "default": null,
            "nullable": true,
            "type": "string"
          },
          "defaultValue": {
            "default": null,
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/DefaultValueString"
              }
            ]
          },
          "integrationToolVariableName": {
            "type": "string"
          },
          "captureType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ToolNodeCaptureType"
              }
            ]
          },
          "required": {
            "type": "boolean",
            "description": "Whether the agent must supply a value for this input. Omit it and the API infers: false when defaultValue holds a secret reference (the secret is injected and the model is never asked for it), true otherwise. Sending true together with a secret defaultValue is rejected."
          },
          "id": {
            "description": "The id a read returned for this entry, to keep it; omit it for a new entry.",
            "type": "string"
          }
        },
        "required": [
          "integrationToolVariableName"
        ]
      }
    },
    "captureResponse": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "A dot path from the top of what the tool returns, because the step already reads inside it: \"order.status\" reads \"shipped\" from { \"order\": { \"status\": \"shipped\" } }. Add no wrapper it does not have, such as data., body. or output."
          },
          "variableOrEntityID": {
            "nullable": true,
            "type": "string"
          },
          "captureType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ToolNodeCaptureType"
              }
            ]
          },
          "id": {
            "description": "The id a read returned for this entry, to keep it; omit it for a new entry.",
            "type": "string"
          }
        },
        "required": [
          "path",
          "variableOrEntityID"
        ]
      }
    }
  },
  "additionalProperties": false
}
```

### StableWorkflowStepKind

```json
{
  "type": "string",
  "enum": [
    "message",
    "end",
    "set",
    "workflow",
    "listen",
    "condition",
    "buttons",
    "card",
    "carousel",
    "code",
    "api",
    "function",
    "integration",
    "mcp",
    "playbook",
    "operator",
    "crew",
    "handoff",
    "legacy",
    "goToBlock",
    "callForward"
  ],
  "description": "What the step does. api, function, integration and mcp are Tool steps. playbook and operator are Agent steps. goToBlock jumps to a block or a workflow start and ends the path. callForward transfers a phone call and ends the path. legacy is a step these operations show but cannot change.",
  "x-enumNames": [
    "MESSAGE",
    "END",
    "SET",
    "WORKFLOW",
    "LISTEN",
    "CONDITION",
    "BUTTONS",
    "CARD",
    "CAROUSEL",
    "CODE",
    "API",
    "FUNCTION",
    "INTEGRATION",
    "MCP",
    "PLAYBOOK",
    "OPERATOR",
    "CREW",
    "HANDOFF",
    "LEGACY",
    "GO_TO_BLOCK",
    "CALL_FORWARD"
  ]
}
```

### StableWorkflowStepListenContent

```json
{
  "type": "object",
  "properties": {
    "variableID": {
      "nullable": true,
      "description": "The variable that receives the user's reply.",
      "type": "string"
    },
    "noReply": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowNoReply"
        }
      ]
    },
    "listenForOtherTriggers": {
      "type": "boolean"
    }
  },
  "required": [
    "variableID",
    "noReply",
    "listenForOtherTriggers"
  ]
}
```

### StableWorkflowStepListenContentInput

```json
{
  "type": "object",
  "properties": {
    "variableID": {
      "nullable": true,
      "type": "string"
    },
    "noReply": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowNoReply"
        }
      ]
    },
    "listenForOtherTriggers": {
      "type": "boolean"
    }
  },
  "required": [
    "variableID"
  ],
  "additionalProperties": false
}
```

### StableWorkflowStepListenContentPatch

```json
{
  "type": "object",
  "properties": {
    "variableID": {
      "nullable": true,
      "type": "string"
    },
    "noReply": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowNoReply"
        }
      ]
    },
    "listenForOtherTriggers": {
      "type": "boolean"
    }
  },
  "additionalProperties": false
}
```

### StableWorkflowStepMcpContent

```json
{
  "type": "object",
  "properties": {
    "mcpToolID": {
      "type": "string"
    },
    "mcpToolName": {
      "nullable": true,
      "description": "Read-only.",
      "type": "string"
    },
    "description": {
      "nullable": true,
      "type": "string"
    },
    "inputs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "description": {
            "default": null,
            "nullable": true,
            "type": "string"
          },
          "defaultValue": {
            "default": null,
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/DefaultValueString"
              }
            ]
          },
          "mcpIntegrationVariableName": {
            "type": "string"
          },
          "captureType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ToolNodeCaptureType"
              }
            ]
          },
          "required": {
            "type": "boolean",
            "description": "Whether the agent must supply a value for this input. Omit it and the API infers: false when defaultValue holds a secret reference (the secret is injected and the model is never asked for it), true otherwise. Sending true together with a secret defaultValue is rejected."
          }
        },
        "required": [
          "id",
          "mcpIntegrationVariableName",
          "required"
        ]
      }
    },
    "captureResponse": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "variableOrEntityID": {
            "nullable": true,
            "type": "string"
          },
          "captureType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ToolNodeCaptureType"
              }
            ]
          }
        },
        "required": [
          "id",
          "path",
          "variableOrEntityID"
        ]
      }
    }
  },
  "required": [
    "mcpToolID",
    "mcpToolName",
    "description",
    "inputs",
    "captureResponse"
  ]
}
```

### StableWorkflowStepMcpContentInput

```json
{
  "type": "object",
  "properties": {
    "mcpToolID": {
      "type": "string"
    },
    "description": {
      "nullable": true,
      "type": "string"
    },
    "inputs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "description": {
            "default": null,
            "nullable": true,
            "type": "string"
          },
          "defaultValue": {
            "default": null,
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/DefaultValueString"
              }
            ]
          },
          "mcpIntegrationVariableName": {
            "type": "string"
          },
          "captureType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ToolNodeCaptureType"
              }
            ]
          },
          "required": {
            "type": "boolean",
            "description": "Whether the agent must supply a value for this input. Omit it and the API infers: false when defaultValue holds a secret reference (the secret is injected and the model is never asked for it), true otherwise. Sending true together with a secret defaultValue is rejected."
          },
          "id": {
            "description": "The id a read returned for this entry, to keep it; omit it for a new entry.",
            "type": "string"
          }
        },
        "required": [
          "mcpIntegrationVariableName"
        ]
      }
    },
    "captureResponse": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "variableOrEntityID": {
            "nullable": true,
            "type": "string"
          },
          "captureType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ToolNodeCaptureType"
              }
            ]
          },
          "id": {
            "description": "The id a read returned for this entry, to keep it; omit it for a new entry.",
            "type": "string"
          }
        },
        "required": [
          "path",
          "variableOrEntityID"
        ]
      }
    }
  },
  "required": [
    "mcpToolID"
  ],
  "additionalProperties": false
}
```

### StableWorkflowStepMcpContentPatch

```json
{
  "type": "object",
  "properties": {
    "mcpToolID": {
      "type": "string"
    },
    "description": {
      "nullable": true,
      "type": "string"
    },
    "inputs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "description": {
            "default": null,
            "nullable": true,
            "type": "string"
          },
          "defaultValue": {
            "default": null,
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/DefaultValueString"
              }
            ]
          },
          "mcpIntegrationVariableName": {
            "type": "string"
          },
          "captureType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ToolNodeCaptureType"
              }
            ]
          },
          "required": {
            "type": "boolean",
            "description": "Whether the agent must supply a value for this input. Omit it and the API infers: false when defaultValue holds a secret reference (the secret is injected and the model is never asked for it), true otherwise. Sending true together with a secret defaultValue is rejected."
          },
          "id": {
            "description": "The id a read returned for this entry, to keep it; omit it for a new entry.",
            "type": "string"
          }
        },
        "required": [
          "mcpIntegrationVariableName"
        ]
      }
    },
    "captureResponse": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "variableOrEntityID": {
            "nullable": true,
            "type": "string"
          },
          "captureType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ToolNodeCaptureType"
              }
            ]
          },
          "id": {
            "description": "The id a read returned for this entry, to keep it; omit it for a new entry.",
            "type": "string"
          }
        },
        "required": [
          "path",
          "variableOrEntityID"
        ]
      }
    }
  },
  "additionalProperties": false
}
```

### StableWorkflowStepMessageContent

```json
{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "responseType": {
          "type": "string",
          "enum": [
            "message"
          ],
          "x-enumNames": [
            "MESSAGE"
          ]
        },
        "messageID": {
          "nullable": true,
          "description": "The ID of the message this step says, or null. Read its words with the message operations.",
          "type": "string"
        },
        "waitForUserResponse": {
          "type": "boolean",
          "description": "Whether the step waits for the user to reply before it continues."
        }
      },
      "required": [
        "responseType",
        "messageID",
        "waitForUserResponse"
      ]
    },
    {
      "type": "object",
      "properties": {
        "responseType": {
          "type": "string",
          "enum": [
            "prompt"
          ],
          "x-enumNames": [
            "PROMPT"
          ]
        },
        "promptID": {
          "nullable": true,
          "description": "The ID of the prompt this step runs, or null. Read it with the prompt operations.",
          "type": "string"
        },
        "waitForUserResponse": {
          "type": "boolean",
          "description": "Whether the step waits for the user to reply before it continues."
        }
      },
      "required": [
        "responseType",
        "promptID",
        "waitForUserResponse"
      ]
    }
  ]
}
```

### StableWorkflowStepMessageContentInput

```json
{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "responseType": {
          "type": "string",
          "enum": [
            "message"
          ],
          "x-enumNames": [
            "MESSAGE"
          ]
        },
        "messageID": {
          "nullable": true,
          "description": "A message ID from voiceflow_message.create_many. Give every step its own message.",
          "type": "string"
        },
        "waitForUserResponse": {
          "description": "Default false. Leave it false when a Listen or Buttons step comes next, because that step waits for the reply and saves it. True pauses until the user says anything and does not save the reply, so before a Listen the user must answer twice.",
          "type": "boolean"
        }
      },
      "required": [
        "responseType",
        "messageID"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "responseType": {
          "type": "string",
          "enum": [
            "prompt"
          ],
          "x-enumNames": [
            "PROMPT"
          ]
        },
        "promptID": {
          "nullable": true,
          "description": "A prompt ID from voiceflow_prompt.create. Give every step its own prompt.",
          "type": "string"
        },
        "waitForUserResponse": {
          "description": "Default false. Leave it false when a Listen or Buttons step comes next, because that step waits for the reply and saves it. True pauses until the user says anything and does not save the reply, so before a Listen the user must answer twice.",
          "type": "boolean"
        }
      },
      "required": [
        "responseType",
        "promptID"
      ],
      "additionalProperties": false
    }
  ]
}
```

### StableWorkflowStepMessageContentPatch

```json
{
  "type": "object",
  "properties": {
    "responseType": {
      "type": "string",
      "enum": [
        "message",
        "prompt"
      ],
      "x-enumNames": [
        "MESSAGE",
        "PROMPT"
      ]
    },
    "messageID": {
      "nullable": true,
      "type": "string"
    },
    "promptID": {
      "nullable": true,
      "type": "string"
    },
    "waitForUserResponse": {
      "description": "Default false. Leave it false when a Listen or Buttons step comes next, because that step waits for the reply and saves it. True pauses until the user says anything and does not save the reply, so before a Listen the user must answer twice.",
      "type": "boolean"
    }
  },
  "additionalProperties": false
}
```

### StableWorkflowStepOperatorContent

```json
{
  "type": "object",
  "properties": {
    "agentID": {
      "nullable": true,
      "type": "string"
    },
    "agentName": {
      "nullable": true,
      "description": "Read-only.",
      "type": "string"
    },
    "paths": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "label"
        ]
      },
      "description": "Read-only. The agent's paths; each is also a port key of this step."
    },
    "exitEveryConversationalTurn": {
      "type": "boolean"
    },
    "listenForOtherTriggers": {
      "type": "boolean"
    },
    "useAsRoutingAgent": {
      "type": "boolean"
    }
  },
  "required": [
    "agentID",
    "agentName",
    "paths",
    "exitEveryConversationalTurn",
    "listenForOtherTriggers",
    "useAsRoutingAgent"
  ]
}
```

### StableWorkflowStepOperatorContentInput

```json
{
  "type": "object",
  "properties": {
    "agentID": {
      "type": "string"
    },
    "listenForOtherTriggers": {
      "type": "boolean"
    }
  },
  "required": [
    "agentID"
  ],
  "additionalProperties": false
}
```

### StableWorkflowStepOperatorContentPatch

```json
{
  "type": "object",
  "properties": {
    "agentID": {
      "type": "string"
    },
    "listenForOtherTriggers": {
      "type": "boolean"
    }
  },
  "additionalProperties": false
}
```

### StableWorkflowStepPatch

```json
{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "message"
          ],
          "x-enumNames": [
            "MESSAGE"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepMessageContentPatch"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "end"
          ],
          "x-enumNames": [
            "END"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepEndContentPatch"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "set"
          ],
          "x-enumNames": [
            "SET"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepSetContentPatch"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "workflow"
          ],
          "x-enumNames": [
            "WORKFLOW"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepWorkflowContentPatch"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "listen"
          ],
          "x-enumNames": [
            "LISTEN"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepListenContentPatch"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "condition"
          ],
          "x-enumNames": [
            "CONDITION"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepConditionContentPatch"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "buttons"
          ],
          "x-enumNames": [
            "BUTTONS"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepButtonsContentPatch"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "card"
          ],
          "x-enumNames": [
            "CARD"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepCardContentPatch"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "carousel"
          ],
          "x-enumNames": [
            "CAROUSEL"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepCarouselContentPatch"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "code"
          ],
          "x-enumNames": [
            "CODE"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepCodeContentPatch"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "api"
          ],
          "x-enumNames": [
            "API"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepApiContentPatch"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "function"
          ],
          "x-enumNames": [
            "FUNCTION"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepFunctionContentPatch"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "integration"
          ],
          "x-enumNames": [
            "INTEGRATION"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepIntegrationContentPatch"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "mcp"
          ],
          "x-enumNames": [
            "MCP"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepMcpContentPatch"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "playbook"
          ],
          "x-enumNames": [
            "PLAYBOOK"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepPlaybookContentPatch"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "operator"
          ],
          "x-enumNames": [
            "OPERATOR"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepOperatorContentPatch"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "crew"
          ],
          "x-enumNames": [
            "CREW"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepCrewContentPatch"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "handoff"
          ],
          "x-enumNames": [
            "HANDOFF"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepHandoffContentPatch"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "callForward"
          ],
          "x-enumNames": [
            "CALL_FORWARD"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepCallForwardContentPatch"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "goToBlock"
          ],
          "x-enumNames": [
            "GO_TO_BLOCK"
          ]
        },
        "content": {
          "$ref": "#/components/schemas/StableWorkflowStepGoToBlockContentPatch"
        }
      },
      "required": [
        "kind",
        "content"
      ],
      "additionalProperties": false
    }
  ]
}
```

### StableWorkflowStepPlaybookContent

```json
{
  "type": "object",
  "properties": {
    "agentID": {
      "nullable": true,
      "type": "string"
    },
    "agentName": {
      "nullable": true,
      "description": "Read-only.",
      "type": "string"
    },
    "paths": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "label"
        ]
      },
      "description": "Read-only. The agent's paths; each is also a port key of this step."
    },
    "exitEveryConversationalTurn": {
      "type": "boolean"
    },
    "listenForOtherTriggers": {
      "type": "boolean"
    },
    "waitForUserResponse": {
      "type": "boolean",
      "description": "Read-only. True: the step waits for the user to speak first. False: the Playbook talks first, the canvas default."
    },
    "includeGlobalPrompt": {
      "type": "boolean",
      "description": "True: the Playbook also gets the global prompt's persona and guidelines, before its own instructions. False: only its own instructions, the canvas default."
    }
  },
  "required": [
    "agentID",
    "agentName",
    "paths",
    "exitEveryConversationalTurn",
    "listenForOtherTriggers",
    "waitForUserResponse",
    "includeGlobalPrompt"
  ]
}
```

### StableWorkflowStepPlaybookContentInput

```json
{
  "type": "object",
  "properties": {
    "agentID": {
      "type": "string"
    },
    "exitEveryConversationalTurn": {
      "type": "boolean"
    },
    "listenForOtherTriggers": {
      "type": "boolean"
    },
    "includeGlobalPrompt": {
      "description": "True: the Playbook also gets the global prompt's persona and guidelines, before its own instructions. False: only its own instructions, the canvas default.",
      "type": "boolean"
    }
  },
  "required": [
    "agentID"
  ],
  "additionalProperties": false
}
```

### StableWorkflowStepPlaybookContentPatch

```json
{
  "type": "object",
  "properties": {
    "agentID": {
      "type": "string"
    },
    "exitEveryConversationalTurn": {
      "type": "boolean"
    },
    "listenForOtherTriggers": {
      "type": "boolean"
    },
    "includeGlobalPrompt": {
      "description": "True: the Playbook also gets the global prompt's persona and guidelines, before its own instructions. False: only its own instructions, the canvas default.",
      "type": "boolean"
    }
  },
  "additionalProperties": false
}
```

### StableWorkflowStepReadOnlyContent

```json
{
  "type": "object",
  "properties": {
    "readOnly": {
      "type": "boolean",
      "enum": [
        true
      ],
      "x-enumNames": [
        "TRUE"
      ]
    },
    "storedType": {
      "type": "string",
      "description": "The stored step type."
    },
    "reason": {
      "type": "string",
      "description": "Why these operations do not show or change this step's content."
    }
  },
  "required": [
    "readOnly",
    "storedType",
    "reason"
  ]
}
```

### StableWorkflowStepReadResponse

```json
{
  "type": "object",
  "properties": {
    "workflowID": {
      "type": "string"
    },
    "blockID": {
      "nullable": true,
      "description": "The block the step is in, or null for a port action or a step no block lists.",
      "type": "string"
    },
    "step": {
      "$ref": "#/components/schemas/StableWorkflowStep"
    },
    "portAction": {
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowPortActionRef"
        }
      ]
    }
  },
  "required": [
    "workflowID",
    "blockID",
    "step"
  ]
}
```

### StableWorkflowStepSetContent

```json
{
  "type": "object",
  "properties": {
    "assignments": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "value"
                ],
                "x-enumNames": [
                  "VALUE"
                ]
              },
              "variableID": {
                "nullable": true,
                "type": "string"
              },
              "label": {
                "nullable": true,
                "type": "string"
              },
              "value": {
                "nullable": true,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/VariableReferenceString"
                  }
                ]
              }
            },
            "required": [
              "id",
              "type",
              "variableID",
              "label",
              "value"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "prompt"
                ],
                "x-enumNames": [
                  "PROMPT"
                ]
              },
              "variableID": {
                "nullable": true,
                "type": "string"
              },
              "label": {
                "nullable": true,
                "type": "string"
              },
              "promptID": {
                "nullable": true,
                "description": "The prompt whose answer is stored in the variable.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "type",
              "variableID",
              "label",
              "promptID"
            ]
          }
        ]
      }
    },
    "parallelExecution": {
      "type": "boolean",
      "description": "Whether the assignments run at the same time instead of in order."
    },
    "transcriptProperties": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "operationType": {
            "type": "string",
            "enum": [
              "append",
              "replace"
            ],
            "x-enumNames": [
              "APPEND",
              "REPLACE"
            ]
          },
          "propertyID": {
            "nullable": true,
            "type": "string"
          },
          "label": {
            "nullable": true,
            "type": "string"
          },
          "value": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/VariableReferenceString"
              }
            ]
          }
        },
        "required": [
          "id",
          "operationType",
          "propertyID",
          "label",
          "value"
        ]
      }
    }
  },
  "required": [
    "assignments",
    "parallelExecution",
    "transcriptProperties"
  ]
}
```

### StableWorkflowStepSetContentInput

```json
{
  "type": "object",
  "properties": {
    "assignments": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "description": "The id a read returned for this entry, to keep it; omit it for a new entry.",
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "value"
                ],
                "x-enumNames": [
                  "VALUE"
                ]
              },
              "variableID": {
                "nullable": true,
                "type": "string"
              },
              "label": {
                "nullable": true,
                "type": "string"
              },
              "value": {
                "nullable": true,
                "description": "Stored as text with each {variable} filled in, and never calculated: \"{attempts} + 1\" stores \"0 + 1\". A value that is only a number is stored as a number. For math, use a Code step.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/VariableReferenceString"
                  }
                ]
              }
            },
            "required": [
              "type",
              "variableID",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "description": "The id a read returned for this entry, to keep it; omit it for a new entry.",
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "prompt"
                ],
                "x-enumNames": [
                  "PROMPT"
                ]
              },
              "variableID": {
                "nullable": true,
                "type": "string"
              },
              "label": {
                "nullable": true,
                "type": "string"
              },
              "promptID": {
                "nullable": true,
                "type": "string"
              }
            },
            "required": [
              "type",
              "variableID",
              "promptID"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    "parallelExecution": {
      "type": "boolean"
    },
    "transcriptProperties": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "The id a read returned for this entry, to keep it; omit it for a new entry.",
            "type": "string"
          },
          "operationType": {
            "$ref": "#/components/schemas/SetV3NodePropertyItemOperationType"
          },
          "propertyID": {
            "nullable": true,
            "type": "string"
          },
          "label": {
            "nullable": true,
            "type": "string"
          },
          "value": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/VariableReferenceString"
              }
            ]
          }
        },
        "required": [
          "operationType",
          "propertyID",
          "value"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "assignments"
  ],
  "additionalProperties": false
}
```

### StableWorkflowStepSetContentPatch

```json
{
  "type": "object",
  "properties": {
    "assignments": {
      "description": "Replaces every assignment.",
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "description": "The id a read returned for this entry, to keep it; omit it for a new entry.",
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "value"
                ],
                "x-enumNames": [
                  "VALUE"
                ]
              },
              "variableID": {
                "nullable": true,
                "type": "string"
              },
              "label": {
                "nullable": true,
                "type": "string"
              },
              "value": {
                "nullable": true,
                "description": "Stored as text with each {variable} filled in, and never calculated: \"{attempts} + 1\" stores \"0 + 1\". A value that is only a number is stored as a number. For math, use a Code step.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/VariableReferenceString"
                  }
                ]
              }
            },
            "required": [
              "type",
              "variableID",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "description": "The id a read returned for this entry, to keep it; omit it for a new entry.",
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "prompt"
                ],
                "x-enumNames": [
                  "PROMPT"
                ]
              },
              "variableID": {
                "nullable": true,
                "type": "string"
              },
              "label": {
                "nullable": true,
                "type": "string"
              },
              "promptID": {
                "nullable": true,
                "type": "string"
              }
            },
            "required": [
              "type",
              "variableID",
              "promptID"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    "parallelExecution": {
      "type": "boolean"
    },
    "transcriptProperties": {
      "description": "Replaces every transcript property.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "The id a read returned for this entry, to keep it; omit it for a new entry.",
            "type": "string"
          },
          "operationType": {
            "$ref": "#/components/schemas/SetV3NodePropertyItemOperationType"
          },
          "propertyID": {
            "nullable": true,
            "type": "string"
          },
          "label": {
            "nullable": true,
            "type": "string"
          },
          "value": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/VariableReferenceString"
              }
            ]
          }
        },
        "required": [
          "operationType",
          "propertyID",
          "value"
        ],
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}
```

### StableWorkflowStepUpdateRequest

```json
{
  "allOf": [
    {
      "$ref": "#/components/schemas/StableWorkflowStepPatch"
    }
  ]
}
```

### StableWorkflowStepWorkflowContent

```json
{
  "type": "object",
  "properties": {
    "targetWorkflowID": {
      "nullable": true,
      "description": "The workflow this step runs, by the ID the workflow list returns, or null.",
      "type": "string"
    },
    "targetWorkflowName": {
      "nullable": true,
      "description": "Read-only. The name of that workflow.",
      "type": "string"
    },
    "variableMap": {
      "nullable": true,
      "type": "object",
      "properties": {
        "inputs": {
          "type": "array",
          "items": {
            "minItems": 2,
            "maxItems": 2,
            "type": "array",
            "items": {
              "nullable": true,
              "type": "string"
            }
          }
        },
        "outputs": {
          "type": "array",
          "items": {
            "minItems": 2,
            "maxItems": 2,
            "type": "array",
            "items": {
              "nullable": true,
              "type": "string"
            }
          }
        }
      },
      "required": [
        "inputs",
        "outputs"
      ]
    }
  },
  "required": [
    "targetWorkflowID",
    "targetWorkflowName",
    "variableMap"
  ]
}
```

### StableWorkflowStepWorkflowContentInput

```json
{
  "type": "object",
  "properties": {
    "targetWorkflowID": {
      "nullable": true,
      "description": "A workflow ID from voiceflow_workflow.list, not a diagram ID.",
      "type": "string"
    },
    "variableMap": {
      "nullable": true,
      "type": "object",
      "properties": {
        "inputs": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "nullable": true,
                  "type": "string"
                },
                {
                  "nullable": true,
                  "type": "string"
                }
              ]
            },
            "minItems": 2,
            "maxItems": 2
          }
        },
        "outputs": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "nullable": true,
                  "type": "string"
                },
                {
                  "nullable": true,
                  "type": "string"
                }
              ]
            },
            "minItems": 2,
            "maxItems": 2
          }
        }
      },
      "required": [
        "inputs",
        "outputs"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "targetWorkflowID"
  ],
  "additionalProperties": false
}
```

### StableWorkflowStepWorkflowContentPatch

```json
{
  "type": "object",
  "properties": {
    "targetWorkflowID": {
      "nullable": true,
      "type": "string"
    },
    "variableMap": {
      "nullable": true,
      "type": "object",
      "properties": {
        "inputs": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "nullable": true,
                  "type": "string"
                },
                {
                  "nullable": true,
                  "type": "string"
                }
              ]
            },
            "minItems": 2,
            "maxItems": 2
          }
        },
        "outputs": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "nullable": true,
                  "type": "string"
                },
                {
                  "nullable": true,
                  "type": "string"
                }
              ]
            },
            "minItems": 2,
            "maxItems": 2
          }
        }
      },
      "required": [
        "inputs",
        "outputs"
      ],
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
```

### StableWorkflowStepWriteResponse

```json
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "What was written."
    },
    "blockID": {
      "nullable": true,
      "description": "The block that holds the step, or null for a step that no block lists.",
      "type": "string"
    },
    "step": {
      "$ref": "#/components/schemas/StableWorkflowStep"
    },
    "portAction": {
      "description": "Set when the step is an action on an exit: the step and port that run it, and its position.",
      "allOf": [
        {
          "$ref": "#/components/schemas/StableWorkflowPortActionRef"
        }
      ]
    },
    "ids": {
      "description": "Each key you sent on the step or its branches, mapped to the ID the server created.",
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "clearedLinks": {
      "description": "Links this write cleared because they would no longer run.",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableWorkflowClearedLink"
      }
    },
    "unresolvedReferences": {
      "description": "References this write kept as literal text instead of binding, each with the reason. The write still succeeded.",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/StableUnresolvedReference"
      }
    }
  },
  "required": [
    "message",
    "blockID",
    "step"
  ]
}
```

### StableWorkflowSummary

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The workflow ID that every workflow operation, a Workflow step and a Go to block take."
    },
    "name": {
      "type": "string"
    },
    "description": {
      "nullable": true,
      "type": "string"
    },
    "folderID": {
      "nullable": true,
      "type": "string"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
    }
  },
  "required": [
    "id",
    "name",
    "description",
    "folderID",
    "updatedAt"
  ]
}
```

### StableWorkflowUpdateRequest

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "description": {
      "nullable": true,
      "type": "string"
    },
    "folderID": {
      "description": "A workflow folder in this environment, or null for the top level.",
      "nullable": true,
      "type": "string"
    }
  },
  "additionalProperties": false
}
```

### ToolNodeCaptureType

```json
{
  "type": "string",
  "enum": [
    "variable",
    "property"
  ],
  "x-enumNames": [
    "VARIABLE",
    "PROPERTY"
  ]
}
```

### VariableReferenceString

```json
{
  "type": "string",
  "description": "Plain text; markdown is not interpreted. {variable_name} inserts a variable or entity, {variable_name.path} a field of a variable. Escape a literal { or \\ with a backslash. A name matching neither is stored as literal text and reported in unresolvedReferences; secrets are not available here."
}
```
