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

# Interact (non-stream)

> Send an action and receive an array of traces in response.

Call [Start session](/api-reference/session/start-session) to begin a new conversation and receive a `sessionKey`. Then, pass the session key as the `authorization` header on this endpoint to send actions and receive [traces](/trace-types) from your agent.

Each request sends an action describing what happened on the user's side. Actions include sending a text message, selecting a button, signaling a no-reply, or continuing after a handoff. The most common are `launch` (to start a conversation) and `text` (to send a user message).

For streaming responses, use [Interact (stream)](/api-reference/conversation/interact-stream) instead.


## OpenAPI

````yaml /specs/general-runtime/openapi.public.json post /v4/interact
openapi: 3.0.0
info:
  title: General-runtime
  description: Voiceflow runtime service
  version: 1.0.0
  contact: {}
servers:
  - url: https://general-runtime.voiceflow.com
security: []
paths:
  /v4/interact:
    post:
      tags:
        - Conversation
        - Public-Docs
      summary: Interact (non-stream)
      description: Send an action and receive an array of traces in response.
      operationId: V4InteractController_interact
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  description: >-
                    The user's action for this conversation turn. Most commonly,
                    the `text` action is used  to send a message to the agent as
                    a user.
                  allOf:
                    - $ref: '#/components/schemas/AnyRequest'
                variables:
                  description: >-
                    Key-value pairs to set or update on the session before this
                    turn is processed. Useful for injecting context like a
                    user's name, account tier, or current page. [Learn
                    more](/documentation/build/data/variables).
                  type: object
                  additionalProperties: {}
                state: {}
                config:
                  default: {}
                  description: Optional settings for this turn.
                  type: object
                  properties:
                    userTimezone:
                      description: >-
                        The user's IANA timezone string (eg:
                        `America/New_York`). Sets `{vf_user_timezone}` variable.
                        Used to localize time-dependent agent behavior.
                      type: string
              required:
                - action
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  traces:
                    type: array
                    items:
                      $ref: '#/components/schemas/AnyTrace'
                    description: >-
                      An array of [traces](/trace-types) that occurred during
                      this turn.
                required:
                  - traces
      security:
        - session: []
components:
  schemas:
    AnyRequest:
      anyOf:
        - $ref: '#/components/schemas/LaunchRequest'
        - $ref: '#/components/schemas/TextRequest'
        - type: object
          properties:
            type:
              type: string
              enum:
                - file
              x-enumNames:
                - FILE
            payload:
              type: object
              properties:
                text:
                  type: string
                files:
                  minItems: 1
                  type: array
                  items:
                    type: object
                    properties:
                      url:
                        type: string
                        format: uri
                      mimeType:
                        type: string
                      filename:
                        type: string
                      size:
                        type: number
                      s3Key:
                        type: string
                    required:
                      - mimeType
                    additionalProperties: {}
              required:
                - files
              additionalProperties: {}
            diagramID:
              type: string
            time:
              type: number
            metadata:
              type: object
              additionalProperties: {}
          required:
            - type
            - payload
          additionalProperties: {}
          description: Send one or more file attachments, with an optional text message.
        - $ref: '#/components/schemas/ActionRequest'
        - $ref: '#/components/schemas/IntentRequest'
        - $ref: '#/components/schemas/EventRequest'
        - $ref: '#/components/schemas/PathRequest'
        - $ref: '#/components/schemas/NoReplyRequest'
        - $ref: '#/components/schemas/MessageRequest'
        - $ref: '#/components/schemas/EndRequest'
        - $ref: '#/components/schemas/DTMFRequest'
        - $ref: '#/components/schemas/LiveAgentHandoffRequest'
        - $ref: '#/components/schemas/GeneralRequest'
        - $ref: '#/components/schemas/AlexaIntentRequest'
        - $ref: '#/components/schemas/LegacyIntentRequest'
    AnyTrace:
      oneOf:
        - $ref: '#/components/schemas/AudioTrace'
        - $ref: '#/components/schemas/SpeakTrace'
        - $ref: '#/components/schemas/StreamTrace'
        - $ref: '#/components/schemas/BlockTrace'
        - $ref: '#/components/schemas/CardTrace'
        - $ref: '#/components/schemas/CarouselTrace'
        - $ref: '#/components/schemas/ChannelActionTrace'
        - $ref: '#/components/schemas/ChoiceTrace'
        - $ref: '#/components/schemas/CompletionTrace'
        - $ref: '#/components/schemas/DebugTrace'
        - $ref: '#/components/schemas/DTMFTrace'
        - $ref: '#/components/schemas/EntityFillingTrace'
        - $ref: '#/components/schemas/ExitTrace'
        - $ref: '#/components/schemas/FlowTrace'
        - $ref: '#/components/schemas/GoToTrace'
        - $ref: '#/components/schemas/LogTrace'
        - $ref: '#/components/schemas/NoReplyTrace'
        - $ref: '#/components/schemas/PathTrace'
        - $ref: '#/components/schemas/TextTrace'
        - $ref: '#/components/schemas/ReasoningTrace'
        - $ref: '#/components/schemas/VisualTrace'
        - $ref: '#/components/schemas/KnowledgeBaseTrace'
        - $ref: '#/components/schemas/CallForwardTrace'
        - $ref: '#/components/schemas/RealtimeAgentTrace'
        - $ref: '#/components/schemas/LiveAgentHandoffTrace'
        - $ref: '#/components/schemas/ToolCallTrace'
    LaunchRequest:
      type: object
      properties:
        type:
          type: string
          enum:
            - launch
          x-enumNames:
            - LAUNCH
        payload:
          type: object
          properties:
            persona:
              type: string
          additionalProperties: {}
        diagramID:
          type: string
        time:
          type: number
        metadata:
          type: object
          additionalProperties: {}
      required:
        - type
      additionalProperties: {}
      description: Send a launch request to start a new conversation.
    TextRequest:
      type: object
      properties:
        type:
          type: string
          enum:
            - text
          x-enumNames:
            - TEXT
        payload:
          type: string
        diagramID:
          type: string
        time:
          type: number
        metadata:
          type: object
          properties:
            source:
              type: string
      required:
        - type
        - payload
      additionalProperties: {}
      description: Send the user response as a raw text payload.
    ActionRequest:
      type: object
      properties:
        type:
          type: string
          enum:
            - action
          x-enumNames:
            - ACTION
        payload:
          type: object
          properties:
            actions:
              type: array
              items:
                $ref: '#/components/schemas/BaseAction'
            label:
              type: string
          additionalProperties: {}
        diagramID:
          type: string
        time:
          type: number
        metadata:
          type: object
          additionalProperties: {}
      required:
        - type
      additionalProperties: {}
      description: Actions are self-describing operations with an associated payload.
    IntentRequest:
      type: object
      properties:
        type:
          type: string
          enum:
            - intent
          x-enumNames:
            - INTENT
        payload:
          $ref: '#/components/schemas/IntentRequestPayload'
        diagramID:
          type: string
        time:
          type: number
        metadata:
          type: object
          additionalProperties: {}
      required:
        - type
        - payload
      description: Trigger a specific intent from your conversation model.
    EventRequest:
      type: object
      properties:
        type:
          type: string
          enum:
            - event
          x-enumNames:
            - EVENT
        payload:
          $ref: '#/components/schemas/EventRequestPayload'
        diagramID:
          type: string
        time:
          type: number
        metadata:
          type: object
          additionalProperties: {}
      required:
        - type
        - payload
      description: Events are triggers with an associated payload.
    PathRequest:
      type: object
      properties:
        type:
          type: string
        payload:
          type: object
          properties:
            actions:
              type: array
              items:
                $ref: '#/components/schemas/BaseAction'
            label:
              type: string
          required:
            - label
          additionalProperties: {}
        diagramID:
          type: string
        time:
          type: number
        metadata:
          type: object
          additionalProperties: {}
      required:
        - type
        - payload
      additionalProperties: {}
      description: Continue the conversation by traveling down the specified path.
    NoReplyRequest:
      type: object
      properties:
        type:
          type: string
          enum:
            - no-reply
          x-enumNames:
            - NO_REPLY
        diagramID:
          type: string
        time:
          type: number
        metadata:
          type: object
          additionalProperties: {}
      required:
        - type
      additionalProperties: {}
      description: >-
        Represents the user failing to reply, typically sent after a reasonable
        timeout.
    MessageRequest:
      type: object
      properties:
        type:
          type: string
          enum:
            - message
          x-enumNames:
            - MESSAGE
        payload:
          type: object
          properties:
            message:
              type: string
          required:
            - message
          additionalProperties: {}
        diagramID:
          type: string
        time:
          type: number
        metadata:
          type: object
          additionalProperties: {}
      required:
        - type
        - payload
      additionalProperties: {}
      description: Similar to the `text` action.
    EndRequest:
      type: object
      properties:
        type:
          type: string
          enum:
            - end
          x-enumNames:
            - END
        payload:
          type: object
          properties:
            reason:
              type: string
          required:
            - reason
          additionalProperties: {}
        diagramID:
          type: string
        time:
          type: number
        metadata:
          type: object
          additionalProperties: {}
      required:
        - type
      additionalProperties: {}
      description: Sent to indicate the conversation has been ended.
    DTMFRequest:
      type: object
      properties:
        type:
          type: string
          enum:
            - dtmf
          x-enumNames:
            - DTMF
        payload:
          type: string
        diagramID:
          type: string
        time:
          type: number
        metadata:
          type: object
          additionalProperties: {}
      required:
        - type
        - payload
      additionalProperties: {}
      description: Represents the result of a dial-tone input, used for phone calls.
    LiveAgentHandoffRequest:
      type: object
      properties:
        type:
          type: string
          enum:
            - live-agent-handoff
          x-enumNames:
            - LIVE_AGENT_HANDOFF
        payload:
          oneOf:
            - $ref: '#/components/schemas/LiveAgentHandoffMessagePayload'
            - $ref: '#/components/schemas/LiveAgentHandoffFileUploadPayload'
            - $ref: '#/components/schemas/LiveAgentHandoffContinueConversationPayload'
            - $ref: '#/components/schemas/LiveAgentHandoffReturnToVoiceflowPayload'
        diagramID:
          type: string
        time:
          type: number
        metadata:
          type: object
          additionalProperties: {}
      required:
        - type
        - payload
      additionalProperties: {}
      description: Sent to interact with a connected live agent.
    GeneralRequest:
      type: object
      properties:
        type:
          type: string
        payload:
          type: object
          properties:
            actions:
              type: array
              items:
                $ref: '#/components/schemas/BaseAction'
            label:
              type: string
          additionalProperties: {}
        diagramID:
          type: string
        time:
          type: number
        metadata:
          type: object
          additionalProperties: {}
      required:
        - type
      additionalProperties: {}
      description: Represents an non-system-defined action.
    AlexaIntentRequest:
      type: object
      properties:
        type:
          type: string
          enum:
            - intent
          x-enumNames:
            - INTENT
        payload:
          type: object
          properties:
            actions:
              type: array
              items:
                $ref: '#/components/schemas/BaseAction'
            label:
              type: string
            data:
              type: object
              additionalProperties: {}
            query:
              default: ''
              type: string
            entities:
              default: []
              type: array
              items:
                $ref: '#/components/schemas/IntentRequestEntity'
            intent:
              type: object
              properties:
                name:
                  type: string
              required:
                - name
              additionalProperties: {}
            confidence:
              type: number
          required:
            - data
            - entities
            - intent
        diagramID:
          type: string
        time:
          type: number
        metadata:
          type: object
          additionalProperties: {}
      required:
        - type
        - payload
      additionalProperties: {}
      description: Legacy intent request type that `general-runtime` expects Alexa to send
    LegacyIntentRequest:
      type: object
      properties:
        type:
          type: string
          enum:
            - intent
          x-enumNames:
            - INTENT
        payload:
          type: object
          properties:
            actions:
              type: array
              items:
                $ref: '#/components/schemas/BaseAction'
            label:
              type: string
            query:
              default: ''
              type: string
            entities:
              default: []
              type: array
              items:
                $ref: '#/components/schemas/IntentRequestEntity'
            intent:
              type: object
              properties:
                name:
                  type: string
              required:
                - name
              additionalProperties: {}
            confidence:
              type: number
          required:
            - entities
            - intent
        diagramID:
          type: string
        time:
          type: number
        metadata:
          type: object
          additionalProperties: {}
      required:
        - type
        - payload
      additionalProperties: {}
      description: >-
        The legacy intent request type that `general-runtime` expects from its
        clients.
    AudioTrace:
      type: object
      properties:
        type:
          type: string
          enum:
            - audio
          x-enumNames:
            - AUDIO
        paths:
          type: array
          items:
            $ref: '#/components/schemas/TracePath'
        defaultPath:
          type: number
        time:
          type: number
        turnID:
          type: string
        handleID:
          type: string
        payload:
          anyOf:
            - type: object
              properties:
                state:
                  type: string
                  enum:
                    - start
                  x-enumNames:
                    - START
                messageID:
                  type: string
                delay:
                  type: number
              required:
                - state
                - messageID
            - type: object
              properties:
                state:
                  type: string
                  enum:
                    - content
                  x-enumNames:
                    - CONTENT
                content:
                  type: string
                encoding:
                  $ref: '#/components/schemas/AudioEncoding'
                duration:
                  type: number
              required:
                - state
                - content
                - encoding
            - type: object
              properties:
                state:
                  type: string
                  enum:
                    - end
                  x-enumNames:
                    - END
              required:
                - state
      required:
        - type
        - payload
    SpeakTrace:
      type: object
      properties:
        type:
          type: string
          enum:
            - speak
          x-enumNames:
            - SPEAK
        paths:
          type: array
          items:
            $ref: '#/components/schemas/TracePath'
        defaultPath:
          type: number
        time:
          type: number
        turnID:
          type: string
        handleID:
          type: string
        payload:
          type: object
          properties:
            ai:
              type: boolean
            message:
              type: string
            type:
              $ref: '#/components/schemas/TraceSpeakType'
            src:
              nullable: true
              type: string
            voice:
              type: string
            isPrompt:
              type: boolean
          required:
            - message
            - type
      required:
        - type
        - payload
    StreamTrace:
      type: object
      properties:
        type:
          type: string
          enum:
            - stream
          x-enumNames:
            - STREAM
        paths:
          type: array
          items:
            $ref: '#/components/schemas/TracePath'
        defaultPath:
          type: number
        time:
          type: number
        turnID:
          type: string
        handleID:
          type: string
        payload:
          type: object
          properties:
            src:
              type: string
            token:
              type: string
            action:
              $ref: '#/components/schemas/TraceStreamAction'
            loop:
              type: boolean
            title:
              type: string
            iconImage:
              type: string
            description:
              type: string
            backgroundImage:
              type: string
          required:
            - src
            - token
            - action
      required:
        - type
        - payload
    BlockTrace:
      type: object
      properties:
        type:
          type: string
          enum:
            - block
          x-enumNames:
            - BLOCK
        paths:
          type: array
          items:
            $ref: '#/components/schemas/TracePath'
        defaultPath:
          type: number
        time:
          type: number
        turnID:
          type: string
        handleID:
          type: string
        payload:
          type: object
          properties:
            blockID:
              type: string
          required:
            - blockID
      required:
        - type
        - payload
    CardTrace:
      type: object
      properties:
        type:
          type: string
          enum:
            - cardV2
          x-enumNames:
            - CARD_V_2
        paths:
          type: array
          items:
            $ref: '#/components/schemas/TracePath'
        defaultPath:
          type: number
        time:
          type: number
        turnID:
          type: string
        handleID:
          type: string
        payload:
          $ref: '#/components/schemas/CardTraceCard'
      required:
        - type
        - payload
    CarouselTrace:
      type: object
      properties:
        type:
          type: string
          enum:
            - carousel
          x-enumNames:
            - CAROUSEL
        paths:
          type: array
          items:
            $ref: '#/components/schemas/TracePath'
        defaultPath:
          type: number
        time:
          type: number
        turnID:
          type: string
        handleID:
          type: string
        payload:
          type: object
          properties:
            ref:
              allOf:
                - $ref: '#/components/schemas/DebugTraceRef'
            cards:
              type: array
              items:
                $ref: '#/components/schemas/TraceCarouselCard'
            layout:
              $ref: '#/components/schemas/CarouselLayout'
            messageID:
              type: string
          required:
            - cards
            - layout
      required:
        - type
        - payload
    ChannelActionTrace:
      type: object
      properties:
        type:
          type: string
          enum:
            - channel-action
          x-enumNames:
            - CHANNEL_ACTION
        paths:
          type: array
          items:
            $ref: '#/components/schemas/TracePath'
        defaultPath:
          type: number
        time:
          type: number
        turnID:
          type: string
        handleID:
          type: string
        payload:
          type: object
          properties:
            name:
              type: string
            payload:
              type: object
              additionalProperties: {}
          required:
            - name
            - payload
      required:
        - type
        - payload
    ChoiceTrace:
      type: object
      properties:
        type:
          type: string
          enum:
            - choice
          x-enumNames:
            - CHOICE
        paths:
          type: array
          items:
            $ref: '#/components/schemas/TracePath'
        defaultPath:
          type: number
        time:
          type: number
        turnID:
          type: string
        handleID:
          type: string
        payload:
          type: object
          properties:
            ref:
              allOf:
                - $ref: '#/components/schemas/DebugTraceRef'
            buttons:
              type: array
              items:
                $ref: '#/components/schemas/Button'
            messageID:
              type: string
          required:
            - buttons
      required:
        - type
        - payload
    CompletionTrace:
      type: object
      properties:
        type:
          type: string
          enum:
            - completion
          x-enumNames:
            - COMPLETION
        paths:
          type: array
          items:
            $ref: '#/components/schemas/TracePath'
        defaultPath:
          type: number
        time:
          type: number
        turnID:
          type: string
        handleID:
          type: string
        payload:
          anyOf:
            - type: object
              properties:
                state:
                  type: string
                  enum:
                    - start
                  x-enumNames:
                    - START
                ai:
                  type: boolean
                sourceUrls:
                  type: array
                  items:
                    type: object
                    properties:
                      url:
                        type: string
                      name:
                        type: string
                    required:
                      - url
                delay:
                  type: number
                messageID:
                  type: string
                ref:
                  allOf:
                    - $ref: '#/components/schemas/DebugTraceRef'
              required:
                - state
                - messageID
            - type: object
              properties:
                state:
                  type: string
                  enum:
                    - content
                  x-enumNames:
                    - CONTENT
                content:
                  type: string
              required:
                - state
                - content
            - type: object
              properties:
                state:
                  type: string
                  enum:
                    - end
                  x-enumNames:
                    - END
                ref:
                  allOf:
                    - $ref: '#/components/schemas/DebugTraceRef'
              required:
                - state
      required:
        - type
        - payload
    DebugTrace:
      type: object
      properties:
        type:
          type: string
          enum:
            - debug
          x-enumNames:
            - DEBUG
        paths:
          type: array
          items:
            $ref: '#/components/schemas/TracePath'
        defaultPath:
          type: number
        time:
          type: number
        turnID:
          type: string
        handleID:
          type: string
        payload:
          type: object
          properties:
            ref:
              allOf:
                - $ref: '#/components/schemas/DebugTraceRef'
            type:
              type: string
            level:
              allOf:
                - $ref: '#/components/schemas/DebugTraceLevel'
            message:
              type: string
            context:
              type: string
            metadata:
              type: object
              additionalProperties: {}
          required:
            - message
      required:
        - type
        - payload
    DTMFTrace:
      type: object
      properties:
        type:
          type: string
          enum:
            - dtmf
          x-enumNames:
            - DTMF
        paths:
          type: array
          items:
            $ref: '#/components/schemas/TracePath'
        defaultPath:
          type: number
        time:
          type: number
        turnID:
          type: string
        handleID:
          type: string
        payload:
          $ref: '#/components/schemas/DTMFTracePayload'
      required:
        - type
        - payload
    EntityFillingTrace:
      type: object
      properties:
        type:
          type: string
          enum:
            - entity-filling
          x-enumNames:
            - ENTITY_FILLING
        paths:
          type: array
          items:
            $ref: '#/components/schemas/TracePath'
        defaultPath:
          type: number
        time:
          type: number
        turnID:
          type: string
        handleID:
          type: string
        payload:
          type: object
          properties:
            entityToFill:
              type: string
            intent:
              $ref: '#/components/schemas/IntentRequest'
          required:
            - entityToFill
            - intent
      required:
        - type
        - payload
    ExitTrace:
      type: object
      properties:
        type:
          type: string
          enum:
            - end
          x-enumNames:
            - END
        paths:
          type: array
          items:
            $ref: '#/components/schemas/TracePath'
        defaultPath:
          type: number
        time:
          type: number
        turnID:
          type: string
        handleID:
          type: string
        payload: {}
      required:
        - type
    FlowTrace:
      type: object
      properties:
        type:
          type: string
          enum:
            - flow
          x-enumNames:
            - FLOW
        paths:
          type: array
          items:
            $ref: '#/components/schemas/TracePath'
        defaultPath:
          type: number
        time:
          type: number
        turnID:
          type: string
        handleID:
          type: string
        payload:
          type: object
          properties:
            name:
              type: string
            diagramID:
              type: string
          required:
            - diagramID
      required:
        - type
        - payload
    GoToTrace:
      type: object
      properties:
        type:
          type: string
          enum:
            - goto
          x-enumNames:
            - GOTO
        paths:
          type: array
          items:
            $ref: '#/components/schemas/TracePath'
        defaultPath:
          type: number
        time:
          type: number
        turnID:
          type: string
        handleID:
          type: string
        payload:
          type: object
          properties:
            request:
              $ref: '#/components/schemas/BaseRequest'
          required:
            - request
      required:
        - type
        - payload
    LogTrace:
      type: object
      properties:
        type:
          type: string
          enum:
            - log
          x-enumNames:
            - LOG
        paths:
          type: array
          items:
            $ref: '#/components/schemas/TracePath'
        defaultPath:
          type: number
        time:
          type: number
        turnID:
          type: string
        handleID:
          type: string
        payload:
          type: object
          additionalProperties: {}
      required:
        - type
        - payload
    NoReplyTrace:
      type: object
      properties:
        type:
          type: string
          enum:
            - no-reply
          x-enumNames:
            - NO_REPLY
        paths:
          type: array
          items:
            $ref: '#/components/schemas/TracePath'
        defaultPath:
          type: number
        time:
          type: number
        turnID:
          type: string
        handleID:
          type: string
        payload:
          type: object
          properties:
            timeout:
              type: number
          required:
            - timeout
      required:
        - type
        - payload
    PathTrace:
      type: object
      properties:
        type:
          type: string
          enum:
            - path
          x-enumNames:
            - PATH
        paths:
          type: array
          items:
            $ref: '#/components/schemas/TracePath'
        defaultPath:
          type: number
        time:
          type: number
        turnID:
          type: string
        handleID:
          type: string
        payload:
          type: object
          properties:
            path:
              type: string
          required:
            - path
      required:
        - type
        - payload
    TextTrace:
      type: object
      properties:
        type:
          type: string
          enum:
            - text
          x-enumNames:
            - TEXT
        paths:
          type: array
          items:
            $ref: '#/components/schemas/TracePath'
        defaultPath:
          type: number
        time:
          type: number
        turnID:
          type: string
        handleID:
          type: string
        payload:
          type: object
          properties:
            ai:
              type: boolean
            message:
              type: string
            ref:
              allOf:
                - $ref: '#/components/schemas/DebugTraceRef'
            slate:
              type: object
              properties:
                id:
                  type: string
                content:
                  type: array
                  items: {}
              required:
                - id
                - content
            delay:
              type: number
            voice:
              type: string
            audio:
              type: object
              properties:
                src:
                  type: string
              required:
                - src
            messageID:
              type: string
            sourceUrls:
              type: array
              items:
                type: object
                properties:
                  url:
                    type: string
                  name:
                    type: string
                required:
                  - url
          required:
            - message
            - slate
            - messageID
      required:
        - type
        - payload
    ReasoningTrace:
      type: object
      properties:
        type:
          type: string
          enum:
            - reasoning
          x-enumNames:
            - REASONING
        paths:
          type: array
          items:
            $ref: '#/components/schemas/TracePath'
        defaultPath:
          type: number
        time:
          type: number
        turnID:
          type: string
        handleID:
          type: string
        payload:
          oneOf:
            - type: object
              properties:
                state:
                  type: string
                  enum:
                    - start
                  x-enumNames:
                    - START
              required:
                - state
            - type: object
              properties:
                state:
                  type: string
                  enum:
                    - content
                  x-enumNames:
                    - CONTENT
                content:
                  type: string
              required:
                - state
                - content
            - type: object
              properties:
                state:
                  type: string
                  enum:
                    - end
                  x-enumNames:
                    - END
              required:
                - state
            - type: object
              properties:
                state:
                  type: string
                  enum:
                    - final
                  x-enumNames:
                    - FINAL
                message:
                  type: string
              required:
                - state
                - message
      required:
        - type
        - payload
    VisualTrace:
      type: object
      properties:
        type:
          type: string
          enum:
            - visual
          x-enumNames:
            - VISUAL
        paths:
          type: array
          items:
            $ref: '#/components/schemas/TracePath'
        defaultPath:
          type: number
        time:
          type: number
        turnID:
          type: string
        handleID:
          type: string
        payload:
          $ref: '#/components/schemas/VisualTraceImage'
      required:
        - type
        - payload
    KnowledgeBaseTrace:
      type: object
      properties:
        type:
          type: string
          enum:
            - knowledgeBase
          x-enumNames:
            - KNOWLEDGE_BASE
        paths:
          type: array
          items:
            $ref: '#/components/schemas/TracePath'
        defaultPath:
          type: number
        time:
          type: number
        turnID:
          type: string
        handleID:
          type: string
        payload:
          type: object
          properties:
            chunks:
              type: array
              items:
                type: object
                properties:
                  score:
                    type: number
                  documentID:
                    type: string
                  documentData: {}
                required:
                  - score
                  - documentID
                  - documentData
            query:
              type: object
              properties:
                messages:
                  type: array
                  items:
                    type: object
                    properties:
                      role:
                        type: string
                      content:
                        type: string
                    required:
                      - role
                      - content
                output:
                  nullable: true
                  type: string
              required:
                - messages
                - output
          required:
            - chunks
      required:
        - type
        - payload
    CallForwardTrace:
      type: object
      properties:
        type:
          type: string
          enum:
            - call-forward
          x-enumNames:
            - CALL_FORWARD
        paths:
          type: array
          items:
            $ref: '#/components/schemas/TracePath'
        defaultPath:
          type: number
        time:
          type: number
        turnID:
          type: string
        handleID:
          type: string
        payload:
          anyOf:
            - $ref: '#/components/schemas/CallForwardPhone'
            - $ref: '#/components/schemas/CallForwardSIP'
      required:
        - type
        - payload
    RealtimeAgentTrace:
      type: object
      properties:
        type:
          type: string
          enum:
            - realtime-agent
          x-enumNames:
            - REALTIME_AGENT
        paths:
          type: array
          items:
            $ref: '#/components/schemas/TracePath'
        defaultPath:
          type: number
        time:
          type: number
        turnID:
          type: string
        handleID:
          type: string
        payload:
          oneOf:
            - type: object
              properties:
                action:
                  type: string
                  enum:
                    - START
                  x-enumNames:
                    - START
                input:
                  type: object
                  properties:
                    encoding:
                      $ref: '#/components/schemas/AudioEncoding'
                    sampleRate:
                      type: number
                  required:
                    - encoding
                output:
                  type: object
                  properties:
                    encoding:
                      $ref: '#/components/schemas/AudioEncoding'
                    sampleRate:
                      type: number
                  required:
                    - encoding
              required:
                - action
                - input
                - output
            - type: object
              properties:
                action:
                  type: string
                  enum:
                    - END
                  x-enumNames:
                    - END
              required:
                - action
            - type: object
              properties:
                action:
                  type: string
                  enum:
                    - INTERRUPTED
                  x-enumNames:
                    - INTERRUPTED
              required:
                - action
      required:
        - type
        - payload
    LiveAgentHandoffTrace:
      type: object
      properties:
        type:
          type: string
          enum:
            - live-agent-handoff
          x-enumNames:
            - LIVE_AGENT_HANDOFF
        paths:
          type: array
          items:
            $ref: '#/components/schemas/TracePath'
        defaultPath:
          type: number
        time:
          type: number
        turnID:
          type: string
        handleID:
          type: string
        payload:
          anyOf:
            - type: object
              properties:
                conversationID:
                  type: string
                  minLength: 1
                message:
                  type: string
                translationKey:
                  type: string
                translationParams:
                  type: object
                  additionalProperties:
                    type: string
                agent:
                  type: object
                  properties:
                    name:
                      type: string
                      minLength: 1
                    imageUrl:
                      type: string
                      format: uri
                  required:
                    - name
                event:
                  type: string
                  enum:
                    - chat_started
                  x-enumNames:
                    - CHAT_STARTED
                provider:
                  allOf:
                    - $ref: '#/components/schemas/LiveAgentHandoffProvider'
                config:
                  type: object
                  properties:
                    returnToAI:
                      type: boolean
              required:
                - conversationID
                - message
                - event
            - type: object
              properties:
                conversationID:
                  type: string
                  minLength: 1
                message:
                  type: string
                translationKey:
                  type: string
                translationParams:
                  type: object
                  additionalProperties:
                    type: string
                agent:
                  type: object
                  properties:
                    name:
                      type: string
                      minLength: 1
                    imageUrl:
                      type: string
                      format: uri
                  required:
                    - name
                event:
                  anyOf:
                    - type: string
                      enum:
                        - chat_ended
                      x-enumNames:
                        - CHAT_ENDED
                    - type: string
                      enum:
                        - chat_dismissed
                      x-enumNames:
                        - CHAT_DISMISSED
                downloadMessage:
                  type: string
                continueMessage:
                  type: string
                newConversationMessage:
                  type: string
              required:
                - conversationID
                - message
                - event
            - type: object
              properties:
                conversationID:
                  type: string
                  minLength: 1
                message:
                  type: string
                translationKey:
                  type: string
                translationParams:
                  type: object
                  additionalProperties:
                    type: string
                agent:
                  type: object
                  properties:
                    name:
                      type: string
                      minLength: 1
                    imageUrl:
                      type: string
                      format: uri
                  required:
                    - name
                event:
                  type: string
                  enum:
                    - file_received
                  x-enumNames:
                    - FILE_RECEIVED
                file:
                  type: object
                  properties:
                    url:
                      type: string
                    name:
                      type: string
                    type:
                      type: string
                  required:
                    - url
                    - name
              required:
                - conversationID
                - message
                - event
                - file
            - type: object
              properties:
                conversationID:
                  type: string
                  minLength: 1
                message:
                  type: string
                translationKey:
                  type: string
                translationParams:
                  type: object
                  additionalProperties:
                    type: string
                agent:
                  type: object
                  properties:
                    name:
                      type: string
                      minLength: 1
                    imageUrl:
                      type: string
                      format: uri
                  required:
                    - name
                event:
                  anyOf:
                    - type: string
                      enum:
                        - participant_joined
                      x-enumNames:
                        - PARTICIPANT_JOINED
                    - type: string
                      enum:
                        - message_received
                      x-enumNames:
                        - MESSAGE_RECEIVED
                    - type: string
                      enum:
                        - event
                      x-enumNames:
                        - EVENT
                    - type: string
                      enum:
                        - wait_time
                      x-enumNames:
                        - WAIT_TIME
                    - type: string
                      enum:
                        - chat_dismissal_warning
                      x-enumNames:
                        - CHAT_DISMISSAL_WARNING
              required:
                - conversationID
                - message
                - event
      required:
        - type
        - payload
    ToolCallTrace:
      type: object
      properties:
        type:
          type: string
          enum:
            - tool-call
          x-enumNames:
            - TOOL_CALL
        paths:
          type: array
          items:
            $ref: '#/components/schemas/TracePath'
        defaultPath:
          type: number
        time:
          type: number
        turnID:
          type: string
        handleID:
          type: string
        payload:
          anyOf:
            - type: object
              properties:
                callID:
                  type: string
                sound:
                  type: object
                  properties:
                    ref:
                      type: string
                  required:
                    - ref
                state:
                  type: string
                  enum:
                    - start
                  x-enumNames:
                    - START
              required:
                - callID
                - state
            - type: object
              properties:
                state:
                  type: string
                  enum:
                    - end
                  x-enumNames:
                    - END
                callID:
                  type: string
              required:
                - state
                - callID
      required:
        - type
        - payload
    BaseAction:
      type: object
      properties:
        type:
          type: string
        payload: {}
      required:
        - type
        - payload
    IntentRequestPayload:
      type: object
      properties:
        actions:
          type: array
          items:
            $ref: '#/components/schemas/BaseAction'
        label:
          type: string
        data:
          type: object
          additionalProperties: {}
        query:
          default: ''
          type: string
        entities:
          default: []
          type: array
          items:
            $ref: '#/components/schemas/IntentRequestEntity'
        intent:
          type: object
          properties:
            name:
              type: string
          required:
            - name
          additionalProperties: {}
        confidence:
          type: number
      required:
        - intent
    EventRequestPayload:
      type: object
      properties:
        actions:
          type: array
          items:
            $ref: '#/components/schemas/BaseAction'
        label:
          type: string
        event:
          type: object
          properties:
            name:
              type: string
          required:
            - name
          additionalProperties: {}
      required:
        - event
    LiveAgentHandoffMessagePayload:
      type: object
      properties:
        type:
          type: string
          enum:
            - message
          x-enumNames:
            - MESSAGE
        message:
          type: string
      required:
        - type
        - message
    LiveAgentHandoffFileUploadPayload:
      type: object
      properties:
        type:
          type: string
          enum:
            - file_upload
          x-enumNames:
            - FILE_UPLOAD
        files:
          minItems: 1
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                minLength: 1
              name:
                type: string
              size:
                type: number
              type:
                type: string
              status:
                type: string
                enum:
                  - uploaded
                  - failed
                x-enumNames:
                  - UPLOADED
                  - FAILED
              metadata:
                type: object
                additionalProperties: {}
            required:
              - id
              - name
              - size
              - type
      required:
        - type
        - files
    LiveAgentHandoffContinueConversationPayload:
      type: object
      properties:
        type:
          type: string
          enum:
            - continue_conversation
          x-enumNames:
            - CONTINUE_CONVERSATION
      required:
        - type
    LiveAgentHandoffReturnToVoiceflowPayload:
      type: object
      properties:
        type:
          type: string
          enum:
            - return_to_voiceflow
          x-enumNames:
            - RETURN_TO_VOICEFLOW
      required:
        - type
    IntentRequestEntity:
      type: object
      properties:
        name:
          type: string
        value:
          type: string
        query:
          type: string
        verboseValue:
          type: array
          items:
            $ref: '#/components/schemas/VerboseValue'
      required:
        - name
        - value
    TracePath:
      type: object
      properties:
        label:
          type: string
        event:
          allOf:
            - $ref: '#/components/schemas/BaseRequest'
    AudioEncoding:
      type: string
      enum:
        - audio/mp3
        - audio/x-mulaw
        - audio/pcm
      x-enumNames:
        - MP_3
        - MULAW
        - PCM
    TraceSpeakType:
      type: string
      enum:
        - audio
        - message
      x-enumNames:
        - AUDIO
        - MESSAGE
    TraceStreamAction:
      type: string
      enum:
        - LOOP
        - PLAY
        - PAUSE
        - END
      x-enumNames:
        - LOOP
        - PLAY
        - PAUSE
        - END
    CardTraceCard:
      type: object
      properties:
        ref:
          allOf:
            - $ref: '#/components/schemas/DebugTraceRef'
        title:
          type: string
        buttons:
          type: array
          items:
            $ref: '#/components/schemas/Button'
        imageUrl:
          nullable: true
          type: string
        messageID:
          type: string
        description:
          type: object
          properties:
            text:
              type: string
            slate:
              type: array
              items: {}
          required:
            - text
      required:
        - title
        - buttons
        - imageUrl
        - description
    DebugTraceRef:
      oneOf:
        - $ref: '#/components/schemas/DebugTraceNodeRef'
        - $ref: '#/components/schemas/DebugTraceAgentRef'
        - $ref: '#/components/schemas/DebugTracePromptRef'
        - $ref: '#/components/schemas/DebugTraceAPIToolRef'
        - $ref: '#/components/schemas/DebugTraceFunctionRef'
        - $ref: '#/components/schemas/DebugTraceIntegrationToolRef'
        - $ref: '#/components/schemas/DebugTraceMcpIntegrationToolRef'
    TraceCarouselCard:
      type: object
      properties:
        ref:
          allOf:
            - $ref: '#/components/schemas/DebugTraceRef'
        title:
          type: string
        buttons:
          type: array
          items:
            $ref: '#/components/schemas/Button'
        imageUrl:
          nullable: true
          type: string
        messageID:
          type: string
        description:
          type: object
          properties:
            text:
              type: string
            slate:
              type: array
              items: {}
          required:
            - text
        id:
          type: string
      required:
        - title
        - buttons
        - imageUrl
        - description
    CarouselLayout:
      type: string
      enum:
        - List
        - Carousel
      x-enumNames:
        - LIST
        - CAROUSEL
    Button:
      type: object
      properties:
        name:
          type: string
        request:
          allOf:
            - $ref: '#/components/schemas/BaseRequest'
      required:
        - name
    DebugTraceLevel:
      type: string
      enum:
        - fatal
        - error
        - warn
        - info
        - debug
      x-enumNames:
        - FATAL
        - ERROR
        - WARN
        - INFO
        - DEBUG
    DTMFTracePayload:
      type: object
      properties:
        enabled:
          type: boolean
          description: Enables the new DTMF collection and configuration
        timeoutInSeconds:
          type: number
          minimum: 0
          maximum: 10
          description: >-
            How long to wait before processing the DTMF input. Set to 0 to
            process only after a delimiter is provided.
        delimiter:
          type: array
          items:
            $ref: '#/components/schemas/DTMFDelimiter'
          description: Which key to use to end DTMF input. Defaults to '#'
        maxDigits:
          type: number
          minimum: 1
          maximum: 20
          description: The maximum number of digits before we finish their input
      required:
        - enabled
        - timeoutInSeconds
        - delimiter
        - maxDigits
    BaseRequest:
      type: object
      properties:
        type:
          type: string
        payload: {}
        diagramID:
          type: string
        time:
          type: number
        metadata:
          type: object
          additionalProperties: {}
      required:
        - type
    VisualTraceImage:
      type: object
      properties:
        visualType:
          type: string
          enum:
            - image
          x-enumNames:
            - IMAGE
        image:
          nullable: true
          type: string
        device:
          nullable: true
          type: string
        options:
          type: object
          properties:
            loop:
              type: boolean
        frameType:
          type: string
        dimensions:
          nullable: true
          type: object
          properties:
            width:
              type: number
            height:
              type: number
          required:
            - width
            - height
        canvasVisibility:
          allOf:
            - $ref: '#/components/schemas/CanvasVisibility'
      required:
        - image
    CallForwardPhone:
      type: object
      properties:
        addressType:
          type: string
          enum:
            - phone
          x-enumNames:
            - PHONE
        address:
          type: string
        extension:
          type: string
        callerIDPassthrough:
          type: boolean
      required:
        - addressType
        - address
    CallForwardSIP:
      type: object
      properties:
        addressType:
          type: string
          enum:
            - sip
          x-enumNames:
            - SIP
        address:
          type: string
      required:
        - addressType
        - address
    LiveAgentHandoffProvider:
      type: string
      enum:
        - ujet
        - genesys
        - kustomer
      x-enumNames:
        - UJET
        - GENESYS
        - KUSTOMER
    VerboseValue:
      type: object
      properties:
        rawText:
          type: string
        canonicalText:
          type: string
        startIndex:
          type: number
      required:
        - rawText
        - canonicalText
        - startIndex
    DebugTraceNodeRef:
      type: object
      properties:
        type:
          type: string
          enum:
            - node
          x-enumNames:
            - NODE
        nodeID:
          type: string
        nodeType:
          type: string
        diagramID:
          type: string
        diagramName:
          type: string
      required:
        - type
        - nodeID
        - nodeType
        - diagramID
    DebugTraceAgentRef:
      type: object
      properties:
        type:
          type: string
          enum:
            - agent
          x-enumNames:
            - AGENT
        nodeID:
          type: string
        agentID:
          type: string
        diagramID:
          type: string
        agentName:
          type: string
        diagramName:
          type: string
      required:
        - type
        - nodeID
        - agentID
        - diagramID
    DebugTracePromptRef:
      type: object
      properties:
        type:
          type: string
          enum:
            - prompt
          x-enumNames:
            - PROMPT
        nodeID:
          type: string
        promptID:
          type: string
        diagramID:
          type: string
        diagramName:
          type: string
      required:
        - type
        - nodeID
        - promptID
        - diagramID
    DebugTraceAPIToolRef:
      type: object
      properties:
        type:
          type: string
          enum:
            - api-tool
          x-enumNames:
            - API_TOOL
        nodeID:
          type: string
        diagramID:
          type: string
        apiToolID:
          type: string
        apiToolName:
          type: string
        diagramName:
          type: string
      required:
        - type
        - nodeID
        - diagramID
        - apiToolID
    DebugTraceFunctionRef:
      type: object
      properties:
        type:
          type: string
          enum:
            - function
          x-enumNames:
            - FUNCTION
        nodeID:
          type: string
        diagramID:
          type: string
        functionID:
          type: string
        functionName:
          type: string
        diagramName:
          type: string
      required:
        - type
        - nodeID
        - diagramID
        - functionID
    DebugTraceIntegrationToolRef:
      type: object
      properties:
        type:
          type: string
          enum:
            - integration-tool
          x-enumNames:
            - INTEGRATION_TOOL
        nodeID:
          type: string
        diagramID:
          type: string
        diagramName:
          type: string
        integrationToolName:
          type: string
      required:
        - type
        - nodeID
        - diagramID
        - integrationToolName
    DebugTraceMcpIntegrationToolRef:
      type: object
      properties:
        type:
          type: string
          enum:
            - mcp-integration-tool
          x-enumNames:
            - MCP_INTEGRATION_TOOL
        nodeID:
          type: string
        diagramID:
          type: string
        mcpToolName:
          type: string
        diagramName:
          type: string
      required:
        - type
        - nodeID
        - diagramID
        - mcpToolName
    DTMFDelimiter:
      type: string
      enum:
        - '#'
        - '*'
      x-enumNames:
        - '#'
        - '*'
    CanvasVisibility:
      type: string
      enum:
        - full
        - hidden
        - cropped
      x-enumNames:
        - FULL
        - HIDDEN
        - CROPPED
  securitySchemes:
    session:
      type: apiKey
      in: header
      name: authorization
      description: Session key returned from the start session endpoint.

````