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

# Get Voice Agent

> Retrieves a specific voice agent by its unique identifier.



## OpenAPI

````yaml /api-reference/openapi.json get /v2/voice-agents/{voiceAgentId}
openapi: 3.0.1
info:
  title: Hamsa API
  description: Trying out our transcription and media-to-text APIs
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.tryhamsa.com
security: []
paths:
  /v2/voice-agents/{voiceAgentId}:
    get:
      summary: Get Voice Agent
      description: Retrieves a specific voice agent by its unique identifier.
      parameters:
        - in: path
          name: voiceAgentId
          required: true
          description: UUID of the voice agent.
          schema:
            type: string
            format: uuid
            example: 48f7656f-098b-4c43-b165-7cfd2cc8ac30
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetVoiceAgentV2Response'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '403':
          description: Forbidden - not authorized to access this voice agent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '404':
          description: Voice agent not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '500':
          description: Server Side Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    GetVoiceAgentV2Response:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          $ref: '#/components/schemas/VoiceAgentV2Data'
    ErrorSchema:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
    VoiceAgentV2Data:
      type: object
      description: Voice agent data structure
      properties:
        id:
          type: string
          format: uuid
          example: 48f7656f-098b-4c43-b165-7cfd2cc8ac30
        type:
          type: string
          nullable: true
          example: Single Prompt
        name:
          type: string
          example: Customer Support Agent
        conversation:
          type: object
          properties:
            greetingMessage:
              type: string
              example: Hello, how can I help you today?
            greetingMessageType:
              type: string
              nullable: true
              example: null
            preamble:
              type: string
              example: You are a helpful assistant.
            pokeMessages:
              type: array
              items:
                type: string
              example: []
            params:
              type: object
              additionalProperties:
                type: string
              example: {}
            alignment:
              type: object
              properties:
                greetingMessage:
                  type: string
                  example: ltr
                preamble:
                  type: string
                  example: ltr
        voice:
          type: object
          properties:
            voiceId:
              type: string
              nullable: true
              example: en-US-Neural2-A
            voiceRecordId:
              type: string
              nullable: true
              example: null
            voiceRecord:
              type: object
              nullable: true
              description: TTS voice details
              properties:
                id:
                  type: string
                  format: uuid
                name:
                  type: string
                provider:
                  type: string
                language:
                  type: string
                image:
                  type: string
                  nullable: true
                languageCode:
                  type: string
                  nullable: true
                voiceRecord:
                  type: object
                  nullable: true
            lang:
              type: string
              nullable: true
              example: en
            ttsParams:
              type: object
              nullable: true
              additionalProperties:
                type: string
        llm:
          type: object
          properties:
            provider:
              type: string
              example: openai
            model:
              type: string
              example: gpt-4
            temperature:
              type: number
              example: 0.2
            baseUrl:
              type: string
              nullable: true
              example: null
            apiKey:
              type: string
              nullable: true
              example: null
        callSettings:
          type: object
          properties:
            noiseCancellation:
              type: string
              example: telephony_optimized
            cancelNoisePer:
              type: string
              nullable: true
              example: conversation
            interrupt:
              type: boolean
              example: true
            responseDelay:
              type: number
              example: 400
            userInactivityTimeout:
              type: number
              example: 15
            maxCallDuration:
              type: number
              example: 300
            silenceThreshold:
              type: number
              example: 800
            backgroundNoise:
              type: boolean
              example: false
            thinkingVoice:
              type: boolean
              example: false
            speakerIdentification:
              type: boolean
              example: false
            agenticRag:
              type: boolean
              example: false
            languageDialectSwitcher:
              type: boolean
              example: false
            minInterruptionDuration:
              type: number
              example: 0.5
            vadActivationThreshold:
              type: number
              example: 0.5
            enableAutoGainControl:
              type: boolean
              example: false
            sendDenoisedToStt:
              type: boolean
              example: false
            genderDetection:
              type: boolean
              example: false
            smartCallEnd:
              type: boolean
              example: false
            waitForUserToSpeakFirst:
              type: number
              example: 0
        tools:
          type: array
          nullable: true
          description: Agent tools configuration
          items:
            type: object
        knowledgeBaseItemsIds:
          type: array
          items:
            type: string
            format: uuid
          example: []
        voiceDictionaryIds:
          type: array
          items:
            type: string
            format: uuid
          example: []
        phoneNumber:
          type: object
          nullable: true
          properties:
            type:
              type: string
              example: TWILIO
            id:
              type: string
              format: uuid
              example: 48f7656f-098b-4c43-b165-7cfd2cc8ac30
        webhookUrl:
          type: string
          nullable: true
          example: null
        webhookAuth:
          type: object
          nullable: true
        workflow:
          description: Workflow graph for Flow Agents; `null` for other agent types.
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Workflow'
        outcomeResponseShape:
          type: object
          nullable: true
          description: Expected outcome response structure
        resolvedWebTools:
          type: array
          nullable: true
          description: Resolved web tools with overrides applied
          items:
            type: object
        createdAt:
          type: string
          format: date-time
          example: '2024-01-15T10:30:00Z'
        updatedAt:
          type: string
          format: date-time
          example: '2024-01-15T10:30:00Z'
        account:
          type: object
          description: User account plan information
          properties:
            plan:
              type: string
              nullable: true
              example: pro
    Workflow:
      type: object
      description: >-
        Flow Agent workflow graph. Stored on the agent and only meaningful when
        `type` is `"Flow Agent"`. Holds the graph `nodes`, the `edges`
        connecting them, and workflow-level `customVariables`. Agent-level
        configuration (voice, llm, call settings, tools, webhooks) lives in the
        top-level agent fields, **not** inside this object.
      required:
        - nodes
        - edges
      properties:
        nodes:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowNode'
          description: The workflow nodes (the flow graph).
        edges:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowEdge'
          description: Edges connecting nodes in the builder canvas.
        customVariables:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowVariable'
          default: []
          description: Workflow-level variables available across nodes.
      example:
        nodes:
          - id: 2ZHj3IUpJFc-83H2-f8d3
            type: start
            label: Start
            message: Hello, how can I help you today?
            messageType: prompt
            position:
              x: 0
              'y': 0
            metadata:
              version: 1
            transitions: []
        edges: []
        customVariables:
          - id: z5QsyxUbrKPjYMGaMj1e1
            name: customer_name
            dataType: string
            description: ''
            defaultValue: john
            extractionPrompt: ''
            enumValues: []
    WorkflowNode:
      description: A workflow node. The concrete shape depends on the `type` discriminator.
      oneOf:
        - $ref: '#/components/schemas/WorkflowConversationNode'
        - $ref: '#/components/schemas/WorkflowStartNode'
        - $ref: '#/components/schemas/WorkflowToolNode'
        - $ref: '#/components/schemas/WorkflowWebToolNode'
        - $ref: '#/components/schemas/WorkflowTransferCallNode'
        - $ref: '#/components/schemas/WorkflowEndCallNode'
        - $ref: '#/components/schemas/WorkflowTransferAgentNode'
        - $ref: '#/components/schemas/WorkflowRouterNode'
        - $ref: '#/components/schemas/WorkflowSetLocalVariablesNode'
        - $ref: '#/components/schemas/WorkflowChangeAgentSettingsNode'
      discriminator:
        propertyName: type
        mapping:
          conversation:
            $ref: '#/components/schemas/WorkflowConversationNode'
          start:
            $ref: '#/components/schemas/WorkflowStartNode'
          tool:
            $ref: '#/components/schemas/WorkflowToolNode'
          web_tool:
            $ref: '#/components/schemas/WorkflowWebToolNode'
          transfer_call:
            $ref: '#/components/schemas/WorkflowTransferCallNode'
          end_call:
            $ref: '#/components/schemas/WorkflowEndCallNode'
          transfer_agent:
            $ref: '#/components/schemas/WorkflowTransferAgentNode'
          router:
            $ref: '#/components/schemas/WorkflowRouterNode'
          set_local_variables:
            $ref: '#/components/schemas/WorkflowSetLocalVariablesNode'
          change_agent_settings:
            $ref: '#/components/schemas/WorkflowChangeAgentSettingsNode'
    WorkflowEdge:
      type: object
      additionalProperties: false
      description: An edge between two nodes (ReactFlow canvas).
      required:
        - id
        - source
        - target
      properties:
        id:
          type: string
          description: Edge id (nanoid or UUID).
        source:
          type: string
          description: Source node id.
        target:
          type: string
          description: Target node id.
        sourceHandle:
          type: string
        targetHandle:
          type: string
        type:
          type: string
          default: default
          description: >-
            Edge render type (custom ReactFlow types like `deletable` are
            allowed).
        selected:
          type: boolean
          description: Canvas selection state.
        animated:
          type: boolean
          default: false
        hidden:
          type: boolean
          default: false
        metadata:
          type: object
          properties:
            transitionId:
              type: string
            label:
              type: string
            style:
              type: object
              additionalProperties: true
    WorkflowVariable:
      type: object
      additionalProperties: false
      description: A workflow variable (also used for extracted and nested variables).
      required:
        - id
        - name
        - dataType
      properties:
        id:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          description: Variable id — nanoid or author slug (e.g. `out_var_flights`).
        name:
          type: string
          maxLength: 50
          pattern: ^[a-z][a-z0-9_]*$
          description: Variable name (snake_case).
        description:
          type: string
          maxLength: 500
        dataType:
          type: string
          enum:
            - string
            - number
            - boolean
            - integer
            - array
            - object
        enumValues:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowEnumValue'
          default: []
        isEnumEnabled:
          type: boolean
          default: false
        isRequired:
          type: boolean
          default: false
        defaultValue:
          nullable: true
          description: Default value (string, number, boolean, or null).
        extractionPrompt:
          type: string
        sourceNodeId:
          type: string
        sourceNodeType:
          type: string
        properties:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowVariable'
          description: Child variables (for `object` types).
        item:
          $ref: '#/components/schemas/WorkflowVariable'
          description: Element schema (for `array` types).
    WorkflowConversationNode:
      allOf:
        - $ref: '#/components/schemas/WorkflowNodeBase'
        - type: object
          properties:
            type:
              type: string
              enum:
                - conversation
            messageType:
              type: string
              enum:
                - static
                - prompt
              default: prompt
              description: >-
                Whether the message is a literal `static` string or a `prompt`
                for the LLM.
            message:
              type: string
              description: >-
                Node message. May be empty. Supports `{{variable}}`
                interpolation.
            interruptMode:
              type: string
              enum:
                - inherit
                - enable
                - disable
              default: inherit
            extractVariables:
              $ref: '#/components/schemas/WorkflowExtractVariablesConfig'
            dtmfInputCapture:
              description: DTMF capture config, or null.
              nullable: true
              allOf:
                - $ref: '#/components/schemas/WorkflowDtmfInputCapture'
      description: Conversation node — the agent speaks/listens.
    WorkflowStartNode:
      allOf:
        - $ref: '#/components/schemas/WorkflowNodeBase'
        - type: object
          properties:
            type:
              type: string
              enum:
                - start
            subType:
              type: string
              enum:
                - conversation
                - tool
              default: conversation
            messageType:
              type: string
              enum:
                - static
                - prompt
              default: prompt
              description: >-
                Whether the message is a literal `static` string or a `prompt`
                for the LLM.
            message:
              type: string
              description: >-
                Node message. May be empty. Supports `{{variable}}`
                interpolation.
            interrupt:
              type: boolean
              default: false
              description: Allow user to interrupt.
            extractVariables:
              $ref: '#/components/schemas/WorkflowExtractVariablesConfig'
            dtmfInputCapture:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/WorkflowDtmfInputCapture'
            timeout:
              type: integer
              minimum: 1
              default: 30000
              description: Timeout in milliseconds.
            overrideResponse:
              type: boolean
              default: false
              description: Override the default response with `customResponse`.
            customResponse:
              type: string
              description: >-
                Custom response shown instead of the default. Required when
                `overrideResponse` is true. Supports `{{variable}}`
                interpolation; may be empty.
            outputMapping:
              type: object
              additionalProperties:
                type: string
              default: {}
              description: Maps tool output fields to workflow variables.
            onErrorBehavior:
              type: string
              enum:
                - continue
                - retry
                - fail
              default: continue
            errorMessage:
              type: string
              description: >-
                Message spoken when the node errors. Supports `{{variable}}`
                interpolation; may be empty.
            processingMessage:
              type: string
              description: Message spoken while the node runs.
            processingMessageType:
              type: string
              enum:
                - static
                - prompt
              default: static
              description: >-
                Whether the message is a literal `static` string or a `prompt`
                for the LLM.
      description: Entry node of the workflow.
    WorkflowToolNode:
      allOf:
        - $ref: '#/components/schemas/WorkflowNodeBase'
        - type: object
          properties:
            type:
              type: string
              enum:
                - tool
            parameters:
              type: array
              items:
                $ref: '#/components/schemas/WorkflowToolParameter'
              default: []
            timeout:
              type: integer
              minimum: 1
              default: 30000
              description: Timeout in milliseconds.
            extractVariables:
              $ref: '#/components/schemas/WorkflowExtractVariablesConfig'
            overrideResponse:
              type: boolean
              default: false
              description: Override the default response with `customResponse`.
            customResponse:
              type: string
              description: >-
                Custom response shown instead of the default. Required when
                `overrideResponse` is true. Supports `{{variable}}`
                interpolation; may be empty.
            outputMapping:
              type: object
              additionalProperties:
                type: string
              default: {}
              description: Maps tool output fields to workflow variables.
            onErrorBehavior:
              type: string
              enum:
                - continue
                - retry
                - fail
              default: continue
            errorMessage:
              type: string
              description: >-
                Message spoken when the node errors. Supports `{{variable}}`
                interpolation; may be empty.
            processingMessage:
              type: string
              description: Message spoken while the node runs.
            processingMessageType:
              type: string
              enum:
                - static
                - prompt
              default: static
              description: >-
                Whether the message is a literal `static` string or a `prompt`
                for the LLM.
      description: Function-tool execution node.
    WorkflowWebToolNode:
      allOf:
        - $ref: '#/components/schemas/WorkflowNodeBase'
        - type: object
          properties:
            type:
              type: string
              enum:
                - web_tool
            processingMessage:
              type: string
              description: Message spoken while the web tool runs.
            processingMessageType:
              type: string
              enum:
                - static
                - prompt
              default: static
              description: >-
                Whether the message is a literal `static` string or a `prompt`
                for the LLM.
      description: Web-tool execution node.
    WorkflowTransferCallNode:
      allOf:
        - $ref: '#/components/schemas/WorkflowNodeBase'
        - type: object
          properties:
            type:
              type: string
              enum:
                - transfer_call
            phoneNumber:
              type: string
              pattern: ^\+?[1-9]\d{1,14}$
              description: Destination phone number (E.164).
              example: '+14155552671'
            transferType:
              type: string
              enum:
                - warm
                - cold
              default: cold
            transferMessage:
              type: string
              description: >-
                Message spoken before transferring. Supports `{{variable}}`
                interpolation; may be empty.
            transferMessageType:
              type: string
              enum:
                - static
                - prompt
              default: prompt
              description: >-
                Whether the message is a literal `static` string or a `prompt`
                for the LLM.
            timeout:
              type: integer
              minimum: 1
              default: 30000
              description: Timeout in milliseconds.
            sipHeaders:
              type: array
              items:
                $ref: '#/components/schemas/WorkflowSipHeader'
              description: Custom SIP headers to attach to the transfer.
          required:
            - phoneNumber
      description: Transfer the call to a phone number.
    WorkflowEndCallNode:
      allOf:
        - $ref: '#/components/schemas/WorkflowNodeBase'
        - type: object
          properties:
            type:
              type: string
              enum:
                - end_call
            finalMessage:
              type: string
              description: >-
                Final message before ending the call. Supports `{{variable}}`
                interpolation; may be empty.
            messageType:
              type: string
              enum:
                - static
                - prompt
              default: prompt
              description: >-
                Whether the message is a literal `static` string or a `prompt`
                for the LLM.
            reason:
              type: string
              enum:
                - completed
                - user_requested
                - error
                - timeout
              default: completed
      description: End the call.
    WorkflowTransferAgentNode:
      allOf:
        - $ref: '#/components/schemas/WorkflowNodeBase'
        - type: object
          properties:
            type:
              type: string
              enum:
                - transfer_agent
            agentId:
              type: string
              minLength: 1
              description: Target voice agent id.
            timeout:
              type: integer
              minimum: 1
              default: 30000
              description: Timeout in milliseconds.
            transferMessage:
              type: string
              description: >-
                Message spoken before handing off. Supports `{{variable}}`
                interpolation; may be empty.
            transferMessageType:
              type: string
              enum:
                - static
                - prompt
              default: static
              description: >-
                Whether the message is a literal `static` string or a `prompt`
                for the LLM.
            handoffConversation:
              type: boolean
              default: false
              description: Pass the conversation transcript to the target agent.
            handoffVariables:
              type: boolean
              default: false
              description: Pass workflow variables to the target agent.
          required:
            - agentId
      description: Hand off to another voice agent.
    WorkflowRouterNode:
      allOf:
        - $ref: '#/components/schemas/WorkflowNodeBase'
        - type: object
          properties:
            type:
              type: string
              enum:
                - router
      description: Routes to a branch based on its transitions.
    WorkflowSetLocalVariablesNode:
      allOf:
        - $ref: '#/components/schemas/WorkflowNodeBase'
        - type: object
          properties:
            type:
              type: string
              enum:
                - set_local_variables
      description: Sets local/static variables (see base `staticVariables`).
    WorkflowChangeAgentSettingsNode:
      allOf:
        - $ref: '#/components/schemas/WorkflowNodeBase'
        - type: object
          properties:
            type:
              type: string
              enum:
                - change_agent_settings
            settingsOverrides:
              type: object
              additionalProperties: true
              default: {}
              description: >-
                Agent-setting overrides applied at this node. Stored as-is and
                not field-validated (mirrors agent-level config).
      description: Overrides agent settings mid-flow.
    WorkflowEnumValue:
      type: object
      additionalProperties: false
      required:
        - value
      properties:
        value:
          type: string
          maxLength: 100
        label:
          type: string
          maxLength: 100
    WorkflowNodeBase:
      type: object
      description: >-
        Fields shared by every workflow node. Node objects are passthrough —
        extra builder-authored fields not listed here are preserved as-is.
      additionalProperties: true
      required:
        - id
        - type
        - position
        - metadata
      properties:
        id:
          type: string
          description: Unique node id (nanoid or UUID).
          example: 2ZHj3IUpJFc-83H2-f8d3
        type:
          type: string
          enum:
            - conversation
            - start
            - tool
            - web_tool
            - transfer_call
            - end_call
            - transfer_agent
            - router
            - set_local_variables
            - change_agent_settings
          description: Node type discriminator.
        label:
          type: string
          maxLength: 100
          description: Display label.
        description:
          type: string
          maxLength: 500
          description: Optional node description.
        isGlobal:
          type: boolean
          default: false
          description: Whether this is a global node.
        globalCondition:
          type: string
          description: >-
            Condition that activates a global node. Supports `{{variable}}`
            interpolation; may be empty.
        globalConditionType:
          type: string
          enum:
            - prompt
            - dtmf
          default: prompt
        globalDtmfKey:
          type: string
          enum:
            - '0'
            - '1'
            - '2'
            - '3'
            - '4'
            - '5'
            - '6'
            - '7'
            - '8'
            - '9'
            - '#'
            - '*'
          description: >-
            DTMF key that triggers the global node when `globalConditionType` is
            `dtmf`.
        globalReturnToSource:
          type: boolean
          default: false
        requiresDoubleConfirm:
          type: boolean
          default: false
        skipResponse:
          type: boolean
          default: false
        staticVariables:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowStaticVariable'
        metadata:
          $ref: '#/components/schemas/WorkflowNodeMetadata'
        transitions:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowTransition'
          default: []
          description: Outgoing transitions to other nodes.
        position:
          $ref: '#/components/schemas/WorkflowPosition'
    WorkflowExtractVariablesConfig:
      type: object
      additionalProperties: false
      description: Variable extraction config for a node.
      properties:
        enabled:
          type: boolean
          default: false
        variables:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowVariable'
          default: []
    WorkflowDtmfInputCapture:
      type: object
      additionalProperties: false
      description: Captures DTMF digits into a variable.
      properties:
        enabled:
          type: boolean
          default: false
        variableName:
          type: string
          default: ''
          description: Variable to store captured digits (required when `enabled`).
        digitLimit:
          type: integer
          minimum: 1
          maximum: 20
        terminationKey:
          type: string
          enum:
            - '0'
            - '1'
            - '2'
            - '3'
            - '4'
            - '5'
            - '6'
            - '7'
            - '8'
            - '9'
            - '#'
            - '*'
        timeoutMs:
          type: integer
          minimum: 1000
          maximum: 30000
    WorkflowToolParameter:
      type: object
      required:
        - name
        - value
      properties:
        name:
          type: string
          minLength: 1
        value:
          type: string
          description: >-
            Parameter value. Supports `{{variable}}` interpolation; may be
            empty.
        type:
          type: string
          enum:
            - string
            - number
            - boolean
            - object
          default: string
        required:
          type: boolean
          default: true
    WorkflowSipHeader:
      type: object
      required:
        - id
        - name
        - value
      properties:
        id:
          type: string
        name:
          type: string
        value:
          type: string
    WorkflowStaticVariable:
      type: object
      additionalProperties: false
      description: A statically-set variable.
      required:
        - id
        - name
        - dataType
        - value
      properties:
        id:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
        name:
          type: string
          maxLength: 50
          pattern: ^[a-z][a-z0-9_]*$
        description:
          type: string
          maxLength: 500
        dataType:
          type: string
          enum:
            - string
            - number
            - boolean
            - integer
            - array
            - object
        value:
          description: The static value (string, number, boolean, array, object, or null).
    WorkflowNodeMetadata:
      type: object
      additionalProperties: false
      description: Node metadata.
      properties:
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        version:
          type: integer
          minimum: 1
          default: 1
    WorkflowTransition:
      type: object
      additionalProperties: false
      description: A transition from one node to another, gated by a condition.
      required:
        - id
        - condition
        - targetNodeId
      properties:
        id:
          type: string
          description: Transition id (nanoid or UUID).
        name:
          type: string
        condition:
          $ref: '#/components/schemas/WorkflowCondition'
        targetNodeId:
          type: string
          description: Target node id, or an empty string if unconnected.
        priority:
          type: integer
          minimum: 0
          default: 0
        isEnabled:
          type: boolean
          default: true
        metadata:
          type: object
          properties:
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
    WorkflowPosition:
      type: object
      description: Canvas position of the node.
      required:
        - x
        - 'y'
      properties:
        x:
          type: number
        'y':
          type: number
    WorkflowCondition:
      description: Transition condition. Shape depends on the `type` discriminator.
      oneOf:
        - $ref: '#/components/schemas/WorkflowNaturalLanguageCondition'
        - $ref: '#/components/schemas/WorkflowStructuredEquationCondition'
        - $ref: '#/components/schemas/WorkflowDtmfCondition'
        - $ref: '#/components/schemas/WorkflowAlwaysCondition'
        - $ref: '#/components/schemas/WorkflowAutoCondition'
      discriminator:
        propertyName: type
        mapping:
          natural_language:
            $ref: '#/components/schemas/WorkflowNaturalLanguageCondition'
          structured_equation:
            $ref: '#/components/schemas/WorkflowStructuredEquationCondition'
          dtmf:
            $ref: '#/components/schemas/WorkflowDtmfCondition'
          always:
            $ref: '#/components/schemas/WorkflowAlwaysCondition'
          auto:
            $ref: '#/components/schemas/WorkflowAutoCondition'
    WorkflowNaturalLanguageCondition:
      type: object
      additionalProperties: false
      required:
        - type
        - prompt
      properties:
        type:
          type: string
          enum:
            - natural_language
        prompt:
          type: string
          minLength: 1
          description: Natural-language condition prompt.
        description:
          type: string
          maxLength: 500
    WorkflowStructuredEquationCondition:
      type: object
      additionalProperties: false
      required:
        - type
        - conditions
      properties:
        type:
          type: string
          enum:
            - structured_equation
        logic:
          type: string
          enum:
            - all
            - any
          default: all
        conditions:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/WorkflowEquationCondition'
        description:
          type: string
          maxLength: 500
    WorkflowDtmfCondition:
      type: object
      additionalProperties: false
      required:
        - type
        - key
      properties:
        type:
          type: string
          enum:
            - dtmf
        key:
          type: string
          enum:
            - '0'
            - '1'
            - '2'
            - '3'
            - '4'
            - '5'
            - '6'
            - '7'
            - '8'
            - '9'
            - '#'
            - '*'
        description:
          type: string
          maxLength: 500
    WorkflowAlwaysCondition:
      type: object
      additionalProperties: false
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - always
        description:
          type: string
          default: Default path
    WorkflowAutoCondition:
      type: object
      additionalProperties: false
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - auto
        description:
          type: string
          default: Auto-advance
    WorkflowEquationCondition:
      type: object
      additionalProperties: false
      description: A single equation condition within a structured_equation.
      required:
        - variable
        - operator
        - value
      properties:
        variable:
          type: string
          pattern: ^[a-z][a-z0-9_]*$
        operator:
          type: string
          enum:
            - equals
            - not_equals
            - greater_than
            - less_than
            - greater_than_or_equal
            - less_than_or_equal
            - contains
            - not_contains
            - exists
            - not_exists
            - regex
        value:
          description: Comparison value (string, number, or boolean).
        description:
          type: string
          maxLength: 500
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Pass the API key in the Authorization header, You need to put Token
        keyword before the API key. e.g. 'Authorization: Token <api-key>'

````