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

# Assistant event stream WebSocket channel

> Single bidirectional channel carrying all assistant event stream messages.
Telnyx-to-customer frames: session.created, session.ended, error, the conversation and response events, the `telnyx.*` telephony events, and session.delegation.created.
Customer-to-Telnyx frames: conversation.item.create and session.delegation.completed.




## AsyncAPI

````yaml openapi/asyncapi/assistant-events/assistant-events.yml assistant-events-websocket
id: assistant-events-websocket
title: Assistant event stream WebSocket channel
description: >
  Single bidirectional channel carrying all assistant event stream messages.

  Telnyx-to-customer frames: session.created, session.ended, error, the
  conversation and response events, the `telnyx.*` telephony events, and
  session.delegation.created.

  Customer-to-Telnyx frames: conversation.item.create and
  session.delegation.completed.
servers:
  - id: customer-assistant-events-websocket
    protocol: wss
    host: yourdomain.com
    bindings:
      - protocol: ws
        version: 0.1.0
        value: {}
        schemaProperties: []
    variables: []
address: /
parameters: []
bindings: []
operations:
  - &ref_22
    id: receiveTelnyxEvents
    title: Receive assistant events from Telnyx
    description: >-
      Telnyx sends session boundary, conversation, response, telephony and
      delegation frames to the customer's WebSocket server.
    type: receive
    messages:
      - &ref_24
        id: telnyxSessionCreated
        contentType: application/json
        payload:
          - name: Session Created
            description: >
              First frame Telnyx sends, once the conversation is ready.

              Every identifier key is always present, `null` where not known — a
              client matching on the shape does not have to distinguish "absent"
              from "not known yet". Keys describing a call are `null` for a
              conversation that is not a call.

              Frames you send before this one are refused with an `error`.
            type: object
            properties:
              - name: type
                type: string
                description: session.created
                required: true
              - name: session
                type: object
                required: true
                properties:
                  - name: conversation_id
                    type: string
                    description: Telnyx conversation identifier.
                    required: true
                  - name: assistant_id
                    type: &ref_0
                      - string
                      - 'null'
                    description: >-
                      Identifier of the assistant that opened the conversation.
                      The socket stays bound to this assistant even after a
                      handoff.
                    required: true
                  - name: call_control_id
                    type: &ref_1
                      - string
                      - 'null'
                    description: >-
                      Telnyx Call Control ID, or `null` when the conversation is
                      not a call.
                    required: true
                  - name: call_session_id
                    type: &ref_2
                      - string
                      - 'null'
                    description: >-
                      Telnyx call session ID, or `null` when the conversation is
                      not a call.
                    required: true
                  - name: call_leg_id
                    type: &ref_3
                      - string
                      - 'null'
                    description: >-
                      Telnyx call leg ID, or `null` when the conversation is not
                      a call.
                    required: true
                  - name: from
                    type: &ref_4
                      - string
                      - 'null'
                    description: Originating number or SIP URI.
                    required: true
                  - name: to
                    type: &ref_5
                      - string
                      - 'null'
                    description: Destination number or SIP URI.
                    required: true
                  - name: direction
                    type: &ref_6
                      - string
                      - 'null'
                    description: Call direction.
                    enumValues:
                      - inbound
                      - outbound
                    required: true
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - type
            - session
          properties:
            type:
              type: string
              const: session.created
              x-parser-schema-id: <anonymous-schema-1>
            session:
              type: object
              additionalProperties: false
              required:
                - conversation_id
                - assistant_id
                - call_control_id
                - call_session_id
                - call_leg_id
                - from
                - to
                - direction
              properties:
                conversation_id:
                  type: string
                  format: uuid
                  description: Telnyx conversation identifier.
                  x-parser-schema-id: <anonymous-schema-3>
                assistant_id:
                  type: *ref_0
                  description: >-
                    Identifier of the assistant that opened the conversation.
                    The socket stays bound to this assistant even after a
                    handoff.
                  x-parser-schema-id: <anonymous-schema-4>
                call_control_id:
                  type: *ref_1
                  description: >-
                    Telnyx Call Control ID, or `null` when the conversation is
                    not a call.
                  x-parser-schema-id: <anonymous-schema-5>
                call_session_id:
                  type: *ref_2
                  description: >-
                    Telnyx call session ID, or `null` when the conversation is
                    not a call.
                  x-parser-schema-id: <anonymous-schema-6>
                call_leg_id:
                  type: *ref_3
                  description: >-
                    Telnyx call leg ID, or `null` when the conversation is not a
                    call.
                  x-parser-schema-id: <anonymous-schema-7>
                from:
                  type: *ref_4
                  description: Originating number or SIP URI.
                  x-parser-schema-id: <anonymous-schema-8>
                to:
                  type: *ref_5
                  description: Destination number or SIP URI.
                  x-parser-schema-id: <anonymous-schema-9>
                direction:
                  type: *ref_6
                  description: Call direction.
                  enum:
                    - inbound
                    - outbound
                    - null
                  x-parser-schema-id: <anonymous-schema-10>
              x-parser-schema-id: <anonymous-schema-2>
          x-parser-schema-id: SessionCreatedFrame
        title: Session Created
        description: >
          First frame Telnyx sends, once the conversation is ready.

          Every identifier key is always present, `null` where not known — a
          client matching on the shape does not have to distinguish "absent"
          from "not known yet". Keys describing a call are `null` for a
          conversation that is not a call.

          Frames you send before this one are refused with an `error`.
        example: |-
          {
            "type": "session.created",
            "session": {
              "conversation_id": "0c1f4a2b-6f5d-11ef-9692-02420aeffb1f",
              "assistant_id": "assistant-0b9c3d21",
              "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ",
              "call_session_id": "ff55a038-6f5d-11ef-9692-02420aeffb1f",
              "call_leg_id": "428c31b6-7af4-4b6f-92e7-7a7e6a4f1d44",
              "from": "+13122010094",
              "to": "+13122123456",
              "direction": "inbound"
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: telnyxSessionCreated
      - &ref_25
        id: telnyxSessionEnded
        contentType: application/json
        payload:
          - name: Session Ended
            description: >-
              Last frame Telnyx sends before closing the connection. It is not
              sent when the connection was already unusable — a refused peer or
              a peer that stopped accepting frames is closed without it.
            type: object
            properties:
              - name: type
                type: string
                description: session.ended
                required: true
              - name: reason
                type: &ref_7
                  - string
                  - 'null'
                description: Why the conversation ended.
                enumValues:
                  - normal
                  - hangup
                  - customer_end
                  - timeout
                  - answering_machine_detected
                  - greeting_error
                  - stt_error
                  - pipeline_failed
                  - service_error
                  - setup_failed
                required: true
              - name: duration_sec
                type: integer
                description: >-
                  Conversation duration in seconds. Reports `0` rather than
                  failing the frame when a timestamp is missing or out of order.
                required: true
              - name: transfer_status
                type: object
                description: >-
                  Outcome of a transfer out of this conversation, or `null` if
                  there was none.
                required: true
                properties:
                  - name: transferred
                    type: boolean
                    description: Whether the transfer succeeded.
                    required: true
                  - name: target
                    type: &ref_8
                      - string
                      - 'null'
                    description: The transfer destination.
                    required: true
                  - name: status
                    type: string
                    enumValues:
                      - completed
                      - failed
                    required: true
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - type
            - reason
            - duration_sec
            - transfer_status
          properties:
            type:
              type: string
              const: session.ended
              x-parser-schema-id: <anonymous-schema-11>
            reason:
              type: *ref_7
              description: Why the conversation ended.
              enum:
                - normal
                - hangup
                - customer_end
                - timeout
                - answering_machine_detected
                - greeting_error
                - stt_error
                - pipeline_failed
                - service_error
                - setup_failed
                - null
              x-parser-schema-id: <anonymous-schema-12>
            duration_sec:
              type: integer
              minimum: 0
              description: >-
                Conversation duration in seconds. Reports `0` rather than
                failing the frame when a timestamp is missing or out of order.
              x-parser-schema-id: <anonymous-schema-13>
            transfer_status:
              description: >-
                Outcome of a transfer out of this conversation, or `null` if
                there was none.
              oneOf:
                - type: 'null'
                  x-parser-schema-id: <anonymous-schema-15>
                - type: object
                  additionalProperties: false
                  required:
                    - transferred
                    - target
                    - status
                  properties:
                    transferred:
                      type: boolean
                      description: Whether the transfer succeeded.
                      x-parser-schema-id: <anonymous-schema-17>
                    target:
                      type: *ref_8
                      description: The transfer destination.
                      x-parser-schema-id: <anonymous-schema-18>
                    status:
                      type: string
                      enum:
                        - completed
                        - failed
                      x-parser-schema-id: <anonymous-schema-19>
                  x-parser-schema-id: <anonymous-schema-16>
              x-parser-schema-id: <anonymous-schema-14>
          x-parser-schema-id: SessionEndedFrame
        title: Session Ended
        description: >-
          Last frame Telnyx sends before closing the connection. It is not sent
          when the connection was already unusable — a refused peer or a peer
          that stopped accepting frames is closed without it.
        example: |-
          {
            "type": "session.ended",
            "reason": "normal",
            "duration_sec": 84,
            "transfer_status": null
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: telnyxSessionEnded
      - &ref_26
        id: telnyxConversationItemCreated
        contentType: application/json
        payload:
          - name: Conversation Item Created
            description: >
              A message was added to the conversation history — a caller
              utterance, an assistant reply, a tool call or a tool result.

              `content` varies by role: a `text` part for ordinary messages, a
              `tool_calls` part for an assistant turn that calls tools, and a
              `text` part carrying `tool_call_id` for a tool result.

              `status` is `incomplete` for an assistant item that is about to be
              streamed, and `completed` once it is final.
            type: object
            properties:
              - name: type
                type: string
                description: conversation.item.created
                required: true
              - name: previous_item_id
                type: &ref_9
                  - string
                  - 'null'
                description: >-
                  Identifier of the item this one follows, or `null` for the
                  first item.
                required: true
              - name: item
                type: object
                required: true
                properties:
                  - name: id
                    type: string
                    description: Identifier of the history item.
                    required: true
                  - name: type
                    type: string
                    description: message
                    required: true
                  - name: status
                    type: string
                    enumValues:
                      - completed
                      - incomplete
                    required: true
                  - name: role
                    type: string
                    enumValues:
                      - user
                      - assistant
                      - tool
                      - system
                      - developer
                    required: true
                  - name: name
                    type: &ref_10
                      - string
                      - 'null'
                    description: Display name of the speaker, when one is known.
                    required: false
                  - name: participant_id
                    type: &ref_11
                      - string
                      - 'null'
                    description: >-
                      Identifier of the participant who produced the item, on a
                      multi-participant conversation. Present on `user` items
                      only.
                    required: false
                  - name: content
                    type: array
                    description: >-
                      Content parts. Empty on an `incomplete` item that is about
                      to be streamed.
                    required: true
                    properties:
                      - name: item
                        type: object
                        required: false
                        properties:
                          - name: type
                            type: string
                            description: text
                            required: true
                          - name: text
                            type: &ref_12
                              - string
                              - 'null'
                            required: true
                          - name: tool_call_id
                            type: string
                            description: >-
                              Present on a tool result, naming the call it
                              answers.
                            required: false
                          - name: type
                            type: string
                            description: tool_calls
                            required: true
                          - name: tool_calls
                            type: array
                            description: >-
                              Tool calls the assistant made on this turn, in the
                              OpenAI tool-call shape.
                            required: true
                            properties:
                              - name: item
                                type: object
                                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - type
            - previous_item_id
            - item
          properties:
            type:
              type: string
              const: conversation.item.created
              x-parser-schema-id: <anonymous-schema-20>
            previous_item_id:
              type: *ref_9
              description: >-
                Identifier of the item this one follows, or `null` for the first
                item.
              x-parser-schema-id: <anonymous-schema-21>
            item: &ref_17
              type: object
              additionalProperties: false
              required:
                - id
                - type
                - status
                - role
                - content
              properties:
                id:
                  type: string
                  description: Identifier of the history item.
                  x-parser-schema-id: <anonymous-schema-22>
                type:
                  type: string
                  const: message
                  x-parser-schema-id: <anonymous-schema-23>
                status:
                  type: string
                  enum:
                    - completed
                    - incomplete
                  x-parser-schema-id: <anonymous-schema-24>
                role:
                  type: string
                  enum:
                    - user
                    - assistant
                    - tool
                    - system
                    - developer
                  x-parser-schema-id: <anonymous-schema-25>
                name:
                  type: *ref_10
                  description: Display name of the speaker, when one is known.
                  x-parser-schema-id: <anonymous-schema-26>
                participant_id:
                  type: *ref_11
                  description: >-
                    Identifier of the participant who produced the item, on a
                    multi-participant conversation. Present on `user` items
                    only.
                  x-parser-schema-id: <anonymous-schema-27>
                content:
                  type: array
                  description: >-
                    Content parts. Empty on an `incomplete` item that is about
                    to be streamed.
                  items:
                    oneOf:
                      - type: object
                        required:
                          - type
                          - text
                        properties:
                          type:
                            type: string
                            const: text
                            x-parser-schema-id: <anonymous-schema-31>
                          text:
                            type: *ref_12
                            x-parser-schema-id: <anonymous-schema-32>
                          tool_call_id:
                            type: string
                            description: >-
                              Present on a tool result, naming the call it
                              answers.
                            x-parser-schema-id: <anonymous-schema-33>
                        x-parser-schema-id: <anonymous-schema-30>
                      - type: object
                        required:
                          - type
                          - tool_calls
                        properties:
                          type:
                            type: string
                            const: tool_calls
                            x-parser-schema-id: <anonymous-schema-35>
                          tool_calls:
                            type: array
                            description: >-
                              Tool calls the assistant made on this turn, in the
                              OpenAI tool-call shape.
                            items:
                              type: object
                              x-parser-schema-id: <anonymous-schema-37>
                            x-parser-schema-id: <anonymous-schema-36>
                        x-parser-schema-id: <anonymous-schema-34>
                    x-parser-schema-id: <anonymous-schema-29>
                  x-parser-schema-id: <anonymous-schema-28>
              x-parser-schema-id: ConversationItem
          x-parser-schema-id: ConversationItemCreatedFrame
        title: Conversation Item Created
        description: >
          A message was added to the conversation history — a caller utterance,
          an assistant reply, a tool call or a tool result.

          `content` varies by role: a `text` part for ordinary messages, a
          `tool_calls` part for an assistant turn that calls tools, and a `text`
          part carrying `tool_call_id` for a tool result.

          `status` is `incomplete` for an assistant item that is about to be
          streamed, and `completed` once it is final.
        example: |-
          {
            "type": "conversation.item.created",
            "previous_item_id": "msg_5f1c0a91",
            "item": {
              "id": "msg_7b2e4d10",
              "type": "message",
              "status": "completed",
              "role": "user",
              "name": null,
              "participant_id": "participant_1",
              "content": [
                {
                  "type": "text",
                  "text": "What time do you close today?"
                }
              ]
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: telnyxConversationItemCreated
      - &ref_27
        id: telnyxConversationItemDeleted
        contentType: application/json
        payload:
          - name: Conversation Item Deleted
            description: >-
              An item was removed from the conversation history, for example
              when an assistant turn is discarded after a barge-in.
            type: object
            properties:
              - name: type
                type: string
                description: conversation.item.deleted
                required: true
              - name: item_id
                type: string
                description: Identifier of the removed history item.
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - type
            - item_id
          properties:
            type:
              type: string
              const: conversation.item.deleted
              x-parser-schema-id: <anonymous-schema-38>
            item_id:
              type: string
              description: Identifier of the removed history item.
              x-parser-schema-id: <anonymous-schema-39>
          x-parser-schema-id: ConversationItemDeletedFrame
        title: Conversation Item Deleted
        description: >-
          An item was removed from the conversation history, for example when an
          assistant turn is discarded after a barge-in.
        example: |-
          {
            "type": "conversation.item.deleted",
            "item_id": "msg_9c1f4a2b"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: telnyxConversationItemDeleted
      - &ref_28
        id: telnyxParticipantAdded
        contentType: application/json
        payload:
          - name: Participant Added
            description: >
              A third party joined a [multi-participant
              conversation](https://developers.telnyx.com/docs/inference/ai-assistants/multi-participant-calls).

              Both human parties on a call are reported as `role: "user"` in the
              transcript, so this transition is what tells a client whose
              utterances start being possible. `participant.id` is the same
              identifier transcript items carry in `item.participant_id`.
            type: object
            properties:
              - name: type
                type: string
                enumValues:
                  - conversation.participant.added
                  - conversation.participant.removed
                required: true
              - name: participant
                type: object
                required: true
                properties:
                  - name: id
                    type: &ref_13
                      - string
                      - 'null'
                    description: >-
                      Participant identifier, matching `item.participant_id` on
                      transcript items.
                    required: true
                  - name: role
                    type: &ref_14
                      - string
                      - 'null'
                    description: Participant role.
                    required: true
                  - name: name
                    type: &ref_15
                      - string
                      - 'null'
                    description: Participant display name.
                    required: true
        headers: []
        jsonPayloadSchema: &ref_16
          type: object
          additionalProperties: false
          required:
            - type
            - participant
          properties:
            type:
              type: string
              enum:
                - conversation.participant.added
                - conversation.participant.removed
              x-parser-schema-id: <anonymous-schema-40>
            participant:
              type: object
              additionalProperties: false
              required:
                - id
                - role
                - name
              properties:
                id:
                  type: *ref_13
                  description: >-
                    Participant identifier, matching `item.participant_id` on
                    transcript items.
                  x-parser-schema-id: <anonymous-schema-42>
                role:
                  type: *ref_14
                  description: Participant role.
                  x-parser-schema-id: <anonymous-schema-43>
                name:
                  type: *ref_15
                  description: Participant display name.
                  x-parser-schema-id: <anonymous-schema-44>
              x-parser-schema-id: <anonymous-schema-41>
          x-parser-schema-id: ParticipantEventFrame
        title: Participant Added
        description: >
          A third party joined a [multi-participant
          conversation](https://developers.telnyx.com/docs/inference/ai-assistants/multi-participant-calls).

          Both human parties on a call are reported as `role: "user"` in the
          transcript, so this transition is what tells a client whose utterances
          start being possible. `participant.id` is the same identifier
          transcript items carry in `item.participant_id`.
        example: |-
          {
            "type": "conversation.participant.added",
            "participant": {
              "id": "participant_2",
              "role": "user",
              "name": "Supervisor"
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: telnyxParticipantAdded
      - &ref_29
        id: telnyxParticipantRemoved
        contentType: application/json
        payload:
          - name: Participant Removed
            description: A party left a multi-participant conversation.
            type: object
            properties:
              - name: type
                type: string
                enumValues:
                  - conversation.participant.added
                  - conversation.participant.removed
                required: true
              - name: participant
                type: object
                required: true
                properties:
                  - name: id
                    type: *ref_13
                    description: >-
                      Participant identifier, matching `item.participant_id` on
                      transcript items.
                    required: true
                  - name: role
                    type: *ref_14
                    description: Participant role.
                    required: true
                  - name: name
                    type: *ref_15
                    description: Participant display name.
                    required: true
        headers: []
        jsonPayloadSchema: *ref_16
        title: Participant Removed
        description: A party left a multi-participant conversation.
        example: |-
          {
            "type": "conversation.participant.removed",
            "participant": {
              "id": "participant_2",
              "role": "user",
              "name": "Supervisor"
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: telnyxParticipantRemoved
      - &ref_30
        id: telnyxResponseCreated
        contentType: application/json
        payload:
          - name: Response Created
            description: >-
              The assistant started generating a response. `response.id`
              correlates every subsequent streaming frame for this turn.
            type: object
            properties:
              - name: type
                type: string
                description: response.created
                required: true
              - name: response
                type: object
                required: true
                properties:
                  - name: id
                    type: string
                    description: >-
                      Response identifier, correlating every streaming frame for
                      this turn.
                    required: true
                  - name: status
                    type: string
                    description: in_progress
                    required: true
                  - name: output
                    type: array
                    required: true
                    properties:
                      - name: item
                        type: object
                        required: false
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - type
            - response
          properties:
            type:
              type: string
              const: response.created
              x-parser-schema-id: <anonymous-schema-45>
            response:
              type: object
              additionalProperties: false
              required:
                - id
                - status
                - output
              properties:
                id:
                  type: string
                  description: >-
                    Response identifier, correlating every streaming frame for
                    this turn.
                  x-parser-schema-id: <anonymous-schema-47>
                status:
                  type: string
                  const: in_progress
                  x-parser-schema-id: <anonymous-schema-48>
                output:
                  type: array
                  items:
                    type: object
                    x-parser-schema-id: <anonymous-schema-50>
                  x-parser-schema-id: <anonymous-schema-49>
              x-parser-schema-id: <anonymous-schema-46>
          x-parser-schema-id: ResponseCreatedFrame
        title: Response Created
        description: >-
          The assistant started generating a response. `response.id` correlates
          every subsequent streaming frame for this turn.
        example: |-
          {
            "type": "response.created",
            "response": {
              "id": "resp_9c1f4a2b",
              "status": "in_progress",
              "output": []
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: telnyxResponseCreated
      - &ref_31
        id: telnyxResponseOutputItemAdded
        contentType: application/json
        payload:
          - name: Response Output Item Added
            description: >-
              An output item was opened on the response being generated. It is
              `incomplete` until the turn finishes.
            type: object
            properties:
              - name: type
                type: string
                description: response.output_item.added
                required: true
              - name: response_id
                type: string
                required: true
              - name: output_index
                type: integer
                description: Index of this item within the response output.
                required: true
              - name: item
                type: object
                required: true
                properties:
                  - name: id
                    type: string
                    description: Identifier of the history item.
                    required: true
                  - name: type
                    type: string
                    description: message
                    required: true
                  - name: status
                    type: string
                    enumValues:
                      - completed
                      - incomplete
                    required: true
                  - name: role
                    type: string
                    enumValues:
                      - user
                      - assistant
                      - tool
                      - system
                      - developer
                    required: true
                  - name: name
                    type: *ref_10
                    description: Display name of the speaker, when one is known.
                    required: false
                  - name: participant_id
                    type: *ref_11
                    description: >-
                      Identifier of the participant who produced the item, on a
                      multi-participant conversation. Present on `user` items
                      only.
                    required: false
                  - name: content
                    type: array
                    description: >-
                      Content parts. Empty on an `incomplete` item that is about
                      to be streamed.
                    required: true
                    properties:
                      - name: item
                        type: object
                        required: false
                        properties:
                          - name: type
                            type: string
                            description: text
                            required: true
                          - name: text
                            type: *ref_12
                            required: true
                          - name: tool_call_id
                            type: string
                            description: >-
                              Present on a tool result, naming the call it
                              answers.
                            required: false
                          - name: type
                            type: string
                            description: tool_calls
                            required: true
                          - name: tool_calls
                            type: array
                            description: >-
                              Tool calls the assistant made on this turn, in the
                              OpenAI tool-call shape.
                            required: true
                            properties:
                              - name: item
                                type: object
                                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - type
            - response_id
            - output_index
            - item
          properties:
            type:
              type: string
              const: response.output_item.added
              x-parser-schema-id: <anonymous-schema-51>
            response_id:
              type: string
              x-parser-schema-id: <anonymous-schema-52>
            output_index:
              type: integer
              description: Index of this item within the response output.
              x-parser-schema-id: <anonymous-schema-53>
            item: *ref_17
          x-parser-schema-id: ResponseOutputItemAddedFrame
        title: Response Output Item Added
        description: >-
          An output item was opened on the response being generated. It is
          `incomplete` until the turn finishes.
        example: |-
          {
            "type": "response.output_item.added",
            "response_id": "resp_9c1f4a2b",
            "output_index": 0,
            "item": {
              "id": "msg_9c1f4a2b",
              "type": "message",
              "status": "incomplete",
              "role": "assistant",
              "name": "Support Assistant",
              "content": []
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: telnyxResponseOutputItemAdded
      - &ref_32
        id: telnyxResponseContentPartAdded
        contentType: application/json
        payload:
          - name: Response Content Part Added
            description: >-
              A content part was opened on an output item. `response.text.delta`
              frames then fill it in.
            type: object
            properties:
              - name: type
                type: string
                description: response.content_part.added
                required: true
              - name: response_id
                type: string
                required: true
              - name: output_index
                type: integer
                required: true
              - name: content_index
                type: integer
                description: Index of this part within the item's content array.
                required: true
              - name: item_id
                type: string
                required: true
              - name: part
                type: object
                required: true
                properties:
                  - name: type
                    type: string
                    description: text
                    required: true
                  - name: text
                    type: string
                    description: >-
                      Always empty — the text arrives as `response.text.delta`
                      frames.
                    required: true
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - type
            - response_id
            - output_index
            - content_index
            - item_id
            - part
          properties:
            type:
              type: string
              const: response.content_part.added
              x-parser-schema-id: <anonymous-schema-54>
            response_id:
              type: string
              x-parser-schema-id: <anonymous-schema-55>
            output_index:
              type: integer
              x-parser-schema-id: <anonymous-schema-56>
            content_index:
              type: integer
              description: Index of this part within the item's content array.
              x-parser-schema-id: <anonymous-schema-57>
            item_id:
              type: string
              x-parser-schema-id: <anonymous-schema-58>
            part:
              type: object
              additionalProperties: false
              required:
                - type
                - text
              properties:
                type:
                  type: string
                  const: text
                  x-parser-schema-id: <anonymous-schema-60>
                text:
                  type: string
                  description: >-
                    Always empty — the text arrives as `response.text.delta`
                    frames.
                  x-parser-schema-id: <anonymous-schema-61>
              x-parser-schema-id: <anonymous-schema-59>
          x-parser-schema-id: ResponseContentPartAddedFrame
        title: Response Content Part Added
        description: >-
          A content part was opened on an output item. `response.text.delta`
          frames then fill it in.
        example: |-
          {
            "type": "response.content_part.added",
            "response_id": "resp_9c1f4a2b",
            "output_index": 0,
            "content_index": 0,
            "item_id": "msg_9c1f4a2b",
            "part": {
              "type": "text",
              "text": ""
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: telnyxResponseContentPartAdded
      - &ref_33
        id: telnyxResponseTextDelta
        contentType: application/json
        payload:
          - name: Response Text Delta
            description: >-
              An incremental chunk of the assistant's reply. Concatenate `delta`
              values sharing the same `item_id` and `content_index` to rebuild
              the text.
            type: object
            properties:
              - name: type
                type: string
                description: response.text.delta
                required: true
              - name: response_id
                type: string
                required: true
              - name: output_index
                type: integer
                required: true
              - name: content_index
                type: integer
                required: true
              - name: item_id
                type: string
                required: true
              - name: delta
                type: string
                description: >-
                  Incremental text to append to the part identified by `item_id`
                  and `content_index`.
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - type
            - response_id
            - output_index
            - content_index
            - item_id
            - delta
          properties:
            type:
              type: string
              const: response.text.delta
              x-parser-schema-id: <anonymous-schema-62>
            response_id:
              type: string
              x-parser-schema-id: <anonymous-schema-63>
            output_index:
              type: integer
              x-parser-schema-id: <anonymous-schema-64>
            content_index:
              type: integer
              x-parser-schema-id: <anonymous-schema-65>
            item_id:
              type: string
              x-parser-schema-id: <anonymous-schema-66>
            delta:
              type: string
              description: >-
                Incremental text to append to the part identified by `item_id`
                and `content_index`.
              x-parser-schema-id: <anonymous-schema-67>
          x-parser-schema-id: ResponseTextDeltaFrame
        title: Response Text Delta
        description: >-
          An incremental chunk of the assistant's reply. Concatenate `delta`
          values sharing the same `item_id` and `content_index` to rebuild the
          text.
        example: |-
          {
            "type": "response.text.delta",
            "response_id": "resp_9c1f4a2b",
            "output_index": 0,
            "content_index": 0,
            "item_id": "msg_9c1f4a2b",
            "delta": "We are open "
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: telnyxResponseTextDelta
      - &ref_34
        id: telnyxCallAnswered
        contentType: application/json
        payload:
          - name: Call Answered
            description: The underlying call was answered.
            type: object
            properties:
              - name: type
                type: string
                description: telnyx.call.answered
                required: true
              - name: call_control_id
                type: string
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - type
          properties:
            type:
              type: string
              const: telnyx.call.answered
              x-parser-schema-id: <anonymous-schema-68>
            call_control_id:
              type: string
              x-parser-schema-id: <anonymous-schema-69>
          x-parser-schema-id: CallAnsweredFrame
        title: Call Answered
        description: The underlying call was answered.
        example: |-
          {
            "type": "telnyx.call.answered",
            "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: telnyxCallAnswered
      - &ref_35
        id: telnyxCallHangup
        contentType: application/json
        payload:
          - name: Call Hangup
            description: The underlying call was hung up.
            type: object
            properties:
              - name: type
                type: string
                description: telnyx.call.hangup
                required: true
              - name: call_control_id
                type: string
                required: false
              - name: cause
                type: string
                description: SIP hangup cause, as reported by Call Control.
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - type
          properties:
            type:
              type: string
              const: telnyx.call.hangup
              x-parser-schema-id: <anonymous-schema-70>
            call_control_id:
              type: string
              x-parser-schema-id: <anonymous-schema-71>
            cause:
              type: string
              description: SIP hangup cause, as reported by Call Control.
              x-parser-schema-id: <anonymous-schema-72>
          x-parser-schema-id: CallHangupFrame
        title: Call Hangup
        description: The underlying call was hung up.
        example: |-
          {
            "type": "telnyx.call.hangup",
            "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ",
            "cause": "normal_clearing"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: telnyxCallHangup
      - &ref_36
        id: telnyxCallDtmfReceived
        contentType: application/json
        payload:
          - name: DTMF Received
            description: The caller pressed a DTMF digit.
            type: object
            properties:
              - name: type
                type: string
                description: telnyx.call.dtmf.received
                required: true
              - name: call_control_id
                type: string
                required: false
              - name: digit
                type: string
                description: The digit pressed.
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - type
          properties:
            type:
              type: string
              const: telnyx.call.dtmf.received
              x-parser-schema-id: <anonymous-schema-73>
            call_control_id:
              type: string
              x-parser-schema-id: <anonymous-schema-74>
            digit:
              type: string
              description: The digit pressed.
              x-parser-schema-id: <anonymous-schema-75>
          x-parser-schema-id: CallDtmfReceivedFrame
        title: DTMF Received
        description: The caller pressed a DTMF digit.
        example: |-
          {
            "type": "telnyx.call.dtmf.received",
            "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ",
            "digit": "1"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: telnyxCallDtmfReceived
      - &ref_37
        id: telnyxCallMachineDetectionEnded
        contentType: application/json
        payload:
          - name: Machine Detection Ended
            description: >-
              Answering-machine detection finished. Standard and premium
              detection are reported identically — which engine produced the
              result is not something a monitoring client should have to branch
              on.
            type: object
            properties:
              - name: type
                type: string
                description: telnyx.call.machine.detection.ended
                required: true
              - name: call_control_id
                type: string
                required: false
              - name: result
                type: string
                description: Detection result, as reported by Call Control.
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - type
          properties:
            type:
              type: string
              const: telnyx.call.machine.detection.ended
              x-parser-schema-id: <anonymous-schema-76>
            call_control_id:
              type: string
              x-parser-schema-id: <anonymous-schema-77>
            result:
              type: string
              description: Detection result, as reported by Call Control.
              x-parser-schema-id: <anonymous-schema-78>
          x-parser-schema-id: CallMachineDetectionEndedFrame
        title: Machine Detection Ended
        description: >-
          Answering-machine detection finished. Standard and premium detection
          are reported identically — which engine produced the result is not
          something a monitoring client should have to branch on.
        example: |-
          {
            "type": "telnyx.call.machine.detection.ended",
            "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ",
            "result": "human"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: telnyxCallMachineDetectionEnded
      - &ref_38
        id: telnyxCallTransferCompleted
        contentType: application/json
        payload:
          - name: Transfer Completed
            description: >
              A transfer out of this conversation succeeded, whether by bridging
              the call or by a completed SIP REFER.

              Which keys are present depends on the mechanism: a bridge carries
              only `target`, while a REFER also carries the leg it was sent on
              and the SIP response. Keys that do not apply are omitted rather
              than sent as `null`.
            type: object
            properties:
              - name: type
                type: string
                description: telnyx.call.transfer.completed
                required: true
              - name: call_control_id
                type: string
                description: >-
                  Present for a SIP REFER transfer, naming the leg the REFER was
                  sent on. Absent for a bridged transfer, which is raised on the
                  destination leg.
                required: false
              - name: target
                type: string
                description: The transfer destination.
                required: false
              - name: status
                type: string
                description: SIP NOTIFY response for a REFER transfer.
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - type
          properties:
            type:
              type: string
              const: telnyx.call.transfer.completed
              x-parser-schema-id: <anonymous-schema-79>
            call_control_id:
              type: string
              description: >-
                Present for a SIP REFER transfer, naming the leg the REFER was
                sent on. Absent for a bridged transfer, which is raised on the
                destination leg.
              x-parser-schema-id: <anonymous-schema-80>
            target:
              type: string
              description: The transfer destination.
              x-parser-schema-id: <anonymous-schema-81>
            status:
              type: string
              description: SIP NOTIFY response for a REFER transfer.
              x-parser-schema-id: <anonymous-schema-82>
          x-parser-schema-id: CallTransferCompletedFrame
        title: Transfer Completed
        description: >
          A transfer out of this conversation succeeded, whether by bridging the
          call or by a completed SIP REFER.

          Which keys are present depends on the mechanism: a bridge carries only
          `target`, while a REFER also carries the leg it was sent on and the
          SIP response. Keys that do not apply are omitted rather than sent as
          `null`.
        example: |-
          {
            "type": "telnyx.call.transfer.completed",
            "target": "+13125550100"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: telnyxCallTransferCompleted
      - &ref_39
        id: telnyxCallTransferFailed
        contentType: application/json
        payload:
          - name: Transfer Failed
            description: A SIP REFER transfer out of this conversation failed.
            type: object
            properties:
              - name: type
                type: string
                description: telnyx.call.transfer.failed
                required: true
              - name: call_control_id
                type: string
                required: false
              - name: target
                type: string
                description: The transfer destination.
                required: false
              - name: status
                type: string
                description: SIP NOTIFY response for the failed REFER.
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - type
          properties:
            type:
              type: string
              const: telnyx.call.transfer.failed
              x-parser-schema-id: <anonymous-schema-83>
            call_control_id:
              type: string
              x-parser-schema-id: <anonymous-schema-84>
            target:
              type: string
              description: The transfer destination.
              x-parser-schema-id: <anonymous-schema-85>
            status:
              type: string
              description: SIP NOTIFY response for the failed REFER.
              x-parser-schema-id: <anonymous-schema-86>
          x-parser-schema-id: CallTransferFailedFrame
        title: Transfer Failed
        description: A SIP REFER transfer out of this conversation failed.
        example: |-
          {
            "type": "telnyx.call.transfer.failed",
            "call_control_id": "v2:T02llQxIyaRkhfRKxgAP8nY511EhFLizdvdUKJiSw8d6A9BborherQ",
            "target": "sip:support@example.com",
            "status": "486"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: telnyxCallTransferFailed
      - &ref_40
        id: telnyxAssistantHandoff
        contentType: application/json
        payload:
          - name: Assistant Handoff
            description: >
              The conversation was handed to a different assistant.

              The socket is not re-dialled against the new assistant's
              `websocket_settings` — that would drop events across the switch —
              so this event is how a monitoring client learns the conversation
              changed hands. A handoff that cascades through several assistants
              is reported once, with the assistant it landed on.
            type: object
            properties:
              - name: type
                type: string
                description: telnyx.assistant.handoff
                required: true
              - name: assistant_id
                type: &ref_18
                  - string
                  - 'null'
                description: The assistant the conversation was handed to.
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - type
          properties:
            type:
              type: string
              const: telnyx.assistant.handoff
              x-parser-schema-id: <anonymous-schema-87>
            assistant_id:
              type: *ref_18
              description: The assistant the conversation was handed to.
              x-parser-schema-id: <anonymous-schema-88>
          x-parser-schema-id: AssistantHandoffFrame
        title: Assistant Handoff
        description: >
          The conversation was handed to a different assistant.

          The socket is not re-dialled against the new assistant's
          `websocket_settings` — that would drop events across the switch — so
          this event is how a monitoring client learns the conversation changed
          hands. A handoff that cascades through several assistants is reported
          once, with the assistant it landed on.
        example: |-
          {
            "type": "telnyx.assistant.handoff",
            "assistant_id": "assistant-4d8e1f37"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: telnyxAssistantHandoff
      - &ref_41
        id: telnyxSessionDelegationCreated
        contentType: application/json
        payload:
          - name: Delegation Created
            description: >
              The assistant is asking your server to answer a delegation. Only
              sent when the assistant runs `delegation_settings.mode: "client"`.

              Answer it with a `session.delegation.completed` frame carrying the
              same `id`. `request` is `null` for a GPT-Live delegation — the
              model raises one with no text of its own, and you work from the
              conversation events this socket is already streaming you.

              If you do not answer in time, or there is no socket connected when
              the delegation is raised, the assistant tells the caller it cannot
              look things up right now and carries on.
            type: object
            properties:
              - name: type
                type: string
                description: session.delegation.created
                required: true
              - name: delegation
                type: object
                required: true
                properties:
                  - name: id
                    type: string
                    description: Identifier to echo back in `session.delegation.completed`.
                    required: true
                  - name: request
                    type: &ref_19
                      - string
                      - 'null'
                    description: >-
                      What the assistant is asking for. `null` on a GPT-Live
                      delegation, where the model raises one with no text of its
                      own.
                    required: true
                  - name: instructions
                    type: &ref_20
                      - string
                      - 'null'
                    description: >-
                      The assistant's `delegation_settings.instructions`, if
                      any.
                    required: true
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - type
            - delegation
          properties:
            type:
              type: string
              const: session.delegation.created
              x-parser-schema-id: <anonymous-schema-89>
            delegation:
              type: object
              additionalProperties: false
              required:
                - id
                - request
                - instructions
              properties:
                id:
                  type: string
                  description: Identifier to echo back in `session.delegation.completed`.
                  x-parser-schema-id: <anonymous-schema-91>
                request:
                  type: *ref_19
                  description: >-
                    What the assistant is asking for. `null` on a GPT-Live
                    delegation, where the model raises one with no text of its
                    own.
                  x-parser-schema-id: <anonymous-schema-92>
                instructions:
                  type: *ref_20
                  description: The assistant's `delegation_settings.instructions`, if any.
                  x-parser-schema-id: <anonymous-schema-93>
              x-parser-schema-id: <anonymous-schema-90>
          x-parser-schema-id: SessionDelegationCreatedFrame
        title: Delegation Created
        description: >
          The assistant is asking your server to answer a delegation. Only sent
          when the assistant runs `delegation_settings.mode: "client"`.

          Answer it with a `session.delegation.completed` frame carrying the
          same `id`. `request` is `null` for a GPT-Live delegation — the model
          raises one with no text of its own, and you work from the conversation
          events this socket is already streaming you.

          If you do not answer in time, or there is no socket connected when the
          delegation is raised, the assistant tells the caller it cannot look
          things up right now and carries on.
        example: |-
          {
            "type": "session.delegation.created",
            "delegation": {
              "id": "5b1d9e02-4c77-4f3a-8a2e-1c6f0b9d7a54",
              "request": null,
              "instructions": "Look up the caller's most recent order and summarize its status."
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: telnyxSessionDelegationCreated
      - &ref_42
        id: telnyxError
        contentType: application/json
        payload:
          - name: Error
            description: >
              Sent when a frame you sent is invalid or cannot be accepted right
              now.

              The connection is closed after ten consecutive invalid frames, and
              immediately on an oversized one. Rate-limited and refused frames
              are answered and discarded without counting toward that limit.
            type: object
            properties:
              - name: type
                type: string
                description: error
                required: true
              - name: error
                type: object
                required: true
                properties:
                  - name: type
                    type: string
                    description: invalid_request_error
                    required: true
                  - name: message
                    type: string
                    description: What was wrong with the frame.
                    required: true
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - type
            - error
          properties:
            type:
              type: string
              const: error
              x-parser-schema-id: <anonymous-schema-94>
            error:
              type: object
              additionalProperties: false
              required:
                - type
                - message
              properties:
                type:
                  type: string
                  const: invalid_request_error
                  x-parser-schema-id: <anonymous-schema-96>
                message:
                  type: string
                  description: What was wrong with the frame.
                  x-parser-schema-id: <anonymous-schema-97>
              x-parser-schema-id: <anonymous-schema-95>
          x-parser-schema-id: ErrorFrame
        title: Error
        description: >
          Sent when a frame you sent is invalid or cannot be accepted right now.

          The connection is closed after ten consecutive invalid frames, and
          immediately on an oversized one. Rate-limited and refused frames are
          answered and discarded without counting toward that limit.
        example: |-
          {
            "type": "error",
            "error": {
              "type": "invalid_request_error",
              "message": "session is not ready; wait for session.created before sending"
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: telnyxError
    bindings: []
    extensions: &ref_21
      - id: x-parser-unique-object-id
        value: assistant-events-websocket
  - &ref_23
    id: sendClientFrames
    title: Send frames back to Telnyx
    description: >-
      The customer's WebSocket server injects conversation messages and answers
      delegations.
    type: send
    messages:
      - &ref_43
        id: clientConversationItemCreate
        contentType: application/json
        payload:
          - name: Create Conversation Item
            description: >
              Inject a message into the conversation.

              A `user` item triggers an answer exactly as a spoken turn does —
              the assistant owns turn-taking, so there is no `response.create`
              verb. An `assistant` item is added to the history without
              provoking a reply.

              Only text content parts are read: `input_text`, `output_text` and
              `text`. Parts of any other type are ignored, and an item whose
              text is empty after trimming is rejected.
            type: object
            properties:
              - name: type
                type: string
                description: conversation.item.create
                required: true
              - name: item
                type: object
                required: true
                properties:
                  - name: type
                    type: string
                    description: message
                    required: true
                  - name: role
                    type: string
                    description: >-
                      `user` triggers an answer; `assistant` is recorded without
                      provoking one.
                    enumValues:
                      - user
                      - assistant
                    required: true
                  - name: content
                    type: array
                    description: >-
                      Content parts. Only text parts are read; anything else is
                      ignored.
                    required: true
                    properties:
                      - name: type
                        type: string
                        enumValues:
                          - input_text
                          - output_text
                          - text
                        required: true
                      - name: text
                        type: string
                        required: true
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - type
            - item
          properties:
            type:
              type: string
              const: conversation.item.create
              x-parser-schema-id: <anonymous-schema-98>
            item:
              type: object
              required:
                - type
                - role
                - content
              properties:
                type:
                  type: string
                  const: message
                  x-parser-schema-id: <anonymous-schema-100>
                role:
                  type: string
                  enum:
                    - user
                    - assistant
                  description: >-
                    `user` triggers an answer; `assistant` is recorded without
                    provoking one.
                  x-parser-schema-id: <anonymous-schema-101>
                content:
                  type: array
                  minItems: 1
                  description: >-
                    Content parts. Only text parts are read; anything else is
                    ignored.
                  items:
                    type: object
                    required:
                      - type
                      - text
                    properties:
                      type:
                        type: string
                        enum:
                          - input_text
                          - output_text
                          - text
                        x-parser-schema-id: <anonymous-schema-104>
                      text:
                        type: string
                        x-parser-schema-id: <anonymous-schema-105>
                    x-parser-schema-id: <anonymous-schema-103>
                  x-parser-schema-id: <anonymous-schema-102>
              x-parser-schema-id: <anonymous-schema-99>
          x-parser-schema-id: ConversationItemCreateFrame
        title: Create Conversation Item
        description: >
          Inject a message into the conversation.

          A `user` item triggers an answer exactly as a spoken turn does — the
          assistant owns turn-taking, so there is no `response.create` verb. An
          `assistant` item is added to the history without provoking a reply.

          Only text content parts are read: `input_text`, `output_text` and
          `text`. Parts of any other type are ignored, and an item whose text is
          empty after trimming is rejected.
        example: |-
          {
            "type": "conversation.item.create",
            "item": {
              "type": "message",
              "role": "user",
              "content": [
                {
                  "type": "input_text",
                  "text": "Actually, make that a delivery instead."
                }
              ]
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: clientConversationItemCreate
      - &ref_44
        id: clientSessionDelegationCompleted
        contentType: application/json
        payload:
          - name: Delegation Completed
            description: >
              Answer a `session.delegation.created` frame.

              Text only — this socket offers no tool vocabulary. `id` must be
              the id from the delegation being answered; an id with no
              delegation waiting on it resolves nothing. An `output` that is
              empty after trimming is rejected, because the assistant has
              already told the caller it is checking and appending nothing would
              be dead air.
            type: object
            properties:
              - name: type
                type: string
                description: session.delegation.completed
                required: true
              - name: delegation
                type: object
                required: true
                properties:
                  - name: id
                    type: string
                    description: >-
                      The `id` from the `session.delegation.created` frame being
                      answered.
                    required: true
                  - name: output
                    type: string
                    description: >-
                      The answer, as plain text. Rejected if empty after
                      trimming.
                    required: true
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - type
            - delegation
          properties:
            type:
              type: string
              const: session.delegation.completed
              x-parser-schema-id: <anonymous-schema-106>
            delegation:
              type: object
              required:
                - id
                - output
              properties:
                id:
                  type: string
                  description: >-
                    The `id` from the `session.delegation.created` frame being
                    answered.
                  x-parser-schema-id: <anonymous-schema-108>
                output:
                  type: string
                  minLength: 1
                  description: The answer, as plain text. Rejected if empty after trimming.
                  x-parser-schema-id: <anonymous-schema-109>
              x-parser-schema-id: <anonymous-schema-107>
          x-parser-schema-id: SessionDelegationCompletedFrame
        title: Delegation Completed
        description: >
          Answer a `session.delegation.created` frame.

          Text only — this socket offers no tool vocabulary. `id` must be the id
          from the delegation being answered; an id with no delegation waiting
          on it resolves nothing. An `output` that is empty after trimming is
          rejected, because the assistant has already told the caller it is
          checking and appending nothing would be dead air.
        example: |-
          {
            "type": "session.delegation.completed",
            "delegation": {
              "id": "5b1d9e02-4c77-4f3a-8a2e-1c6f0b9d7a54",
              "output": "Order 40192 shipped on Tuesday and is due to arrive Thursday."
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: clientSessionDelegationCompleted
    bindings: []
    extensions: *ref_21
sendOperations:
  - *ref_22
receiveOperations:
  - *ref_23
sendMessages:
  - *ref_24
  - *ref_25
  - *ref_26
  - *ref_27
  - *ref_28
  - *ref_29
  - *ref_30
  - *ref_31
  - *ref_32
  - *ref_33
  - *ref_34
  - *ref_35
  - *ref_36
  - *ref_37
  - *ref_38
  - *ref_39
  - *ref_40
  - *ref_41
  - *ref_42
receiveMessages:
  - *ref_43
  - *ref_44
extensions:
  - id: x-parser-unique-object-id
    value: assistant-events-websocket
securitySchemes: []

````