> ## 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.

# 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.



## OpenAPI

````yaml /specs-prettified/realtime/openapi.stable.json post /v1/stable/workflow/{workflowID}/block/{blockID}/step
openapi: 3.0.0
info:
  title: Realtime
  description: Realtime gateway API service
  version: 1.0.0
  contact: {}
servers:
  - url: https://realtime-api.voiceflow.com
security: []
tags: []
paths:
  /v1/stable/workflow/{workflowID}/block/{blockID}/step:
    post:
      tags:
        - Workflow
      summary: Insert workflow step
      description: 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.
      operationId: StableWorkflowController_insertStep
      parameters:
        - name: workflowID
          required: true
          in: path
          schema:
            type: string
          x-vf-doc:
            description: The ID of the workflow to operate on.
          description: The ID of the workflow to operate on.
        - name: blockID
          required: true
          in: path
          schema:
            type: string
          x-vf-doc:
            description: The ID of the block to operate on.
          description: The ID of the block to operate on.
        - name: projectID
          required: true
          in: query
          schema:
            type: string
            description: The ID of the project to operate on.
        - name: environmentAlias
          required: true
          in: query
          schema:
            type: string
            description: The alias of the environment to operate on (e.g. `main`).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/StableWorkflowStepInsertRequest"
      responses:
        "201":
          description: Returns what was written, the block that holds the new step, the
            step itself, and the IDs the server created.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StableWorkflowStepWriteResponse"
          x-vf-doc:
            description: Returns what was written, the block that holds the new step, the
              step itself, and the IDs the server created.
      security:
        - token: []
components:
  schemas:
    StableWorkflowStepInsertRequest:
      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
    StableWorkflowStepInput:
      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
    StableWorkflowSeedKey:
      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.
    StableWorkflowStepMessageContentInput:
      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
    StableWorkflowStepEndContentInput:
      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.'
    StableWorkflowStepSetContentInput:
      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
    VariableReferenceString:
      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.
    SetV3NodePropertyItemOperationType:
      type: string
      enum:
        - append
        - replace
      x-enumNames:
        - APPEND
        - REPLACE
    StableWorkflowStepWorkflowContentInput:
      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
    StableWorkflowStepListenContentInput:
      type: object
      properties:
        variableID:
          nullable: true
          type: string
        noReply:
          nullable: true
          allOf:
            - $ref: "#/components/schemas/StableWorkflowNoReply"
        listenForOtherTriggers:
          type: boolean
      required:
        - variableID
      additionalProperties: false
    StableWorkflowNoReply:
      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
    StableWorkflowStepConditionContentInput:
      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
    StableWorkflowConditionItemInput:
      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
    ConditionOperation:
      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
    StableWorkflowStepButtonsContentInput:
      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
    StableWorkflowButtonInput:
      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
    StableWorkflowNoMatch:
      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
    StableWorkflowStepCardContentInput:
      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
    MarkdownLikeString:
      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."
    StableWorkflowStepCarouselContentInput:
      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
    CarouselV2NodeLayout:
      type: string
      enum:
        - List
        - Carousel
      x-enumNames:
        - LIST
        - CAROUSEL
    StableWorkflowCarouselCardInput:
      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
    StableWorkflowStepCodeContentInput:
      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
    StableWorkflowCodePathInput:
      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
    StableWorkflowStepApiContentInput:
      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
    DefaultValueString:
      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.
    ToolNodeCaptureType:
      type: string
      enum:
        - variable
        - property
      x-enumNames:
        - VARIABLE
        - PROPERTY
    StableWorkflowStepFunctionContentInput:
      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
    StableWorkflowStepIntegrationContentInput:
      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
    StableWorkflowStepMcpContentInput:
      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
    StableWorkflowStepPlaybookContentInput:
      type: object
      properties:
        agentID:
          type: string
        exitEveryConversationalTurn:
          type: boolean
        listenForOtherTriggers:
          type: boolean
      required:
        - agentID
      additionalProperties: false
    StableWorkflowStepOperatorContentInput:
      type: object
      properties:
        agentID:
          type: string
        listenForOtherTriggers:
          type: boolean
      required:
        - agentID
      additionalProperties: false
    StableWorkflowStepCrewContentInput:
      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
    StableExpressionCondition:
      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
    StableConditionAssertion:
      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
    ConditionAssertionLhs:
      type: object
      properties:
        variableID:
          nullable: true
          type: string
        path:
          type: string
      required:
        - variableID
    StableWorkflowCrewExitPathInput:
      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
    StableToolMessageRequest:
      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.
    StableWorkflowStepHandoffContentInput:
      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, and link the port in the same
            call, because an unlinked port leads nowhere.
          type: boolean
      additionalProperties: false
    StableWorkflowHandoffConfigInput:
      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
    LiveAgentHandoffContextType:
      type: string
      enum:
        - full
        - none
        - custom
      x-enumNames:
        - FULL
        - NONE
        - CUSTOM
    StableWorkflowStepCallForwardContentInput:
      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."
    StableWorkflowStepWriteResponse:
      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
    StableWorkflowStep:
      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
    StableWorkflowStepKind:
      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
    StableWorkflowExitClass:
      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
    StableWorkflowStepContent:
      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.
    StableWorkflowStepMessageContent:
      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
    StableWorkflowStepEndContent:
      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
    StableWorkflowStepSetContent:
      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
    StableWorkflowStepWorkflowContent:
      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
    StableWorkflowStepListenContent:
      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
    StableWorkflowStepConditionContent:
      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
    StableWorkflowStepButtonsContent:
      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
    StableWorkflowStepCardContent:
      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
    StableWorkflowStepCarouselContent:
      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
    StableWorkflowStepCodeContent:
      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
    StableWorkflowStepApiContent:
      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
    StableWorkflowStepFunctionContent:
      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
    StableWorkflowStepIntegrationContent:
      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
    StableWorkflowStepMcpContent:
      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
    StableWorkflowStepOperatorContent:
      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
    StableWorkflowStepPlaybookContent:
      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."
      required:
        - agentID
        - agentName
        - paths
        - exitEveryConversationalTurn
        - listenForOtherTriggers
        - waitForUserResponse
    StableWorkflowStepCrewContent:
      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
    StableWorkflowCrewExitMessages:
      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
    StableToolMessageGenerative:
      type: object
      properties:
        enabled:
          type: boolean
        examples:
          type: array
          items:
            $ref: "#/components/schemas/MarkdownLikeString"
      required:
        - enabled
    StableWorkflowStepHandoffContent:
      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
    StableWorkflowHandoffConfig:
      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
    StableWorkflowStepGoToBlockContent:
      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
    StableWorkflowStepCallForwardContent:
      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.
    StableWorkflowStepReadOnlyContent:
      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
    StableWorkflowLink:
      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
    StableWorkflowPortAction:
      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.
    StableWorkflowDiagnostic:
      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:
      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
    StableWorkflowReconciledPorts:
      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
    StableWorkflowPortActionRef:
      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
    StableWorkflowClearedLink:
      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
    StableUnresolvedReference:
      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
  securitySchemes:
    token:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Voiceflow bearer token
````
