Telnyx Call Commands API

Call Control command operations

OpenAPI Specification

telnyx-call-commands-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  contact:
    email: support@telnyx.com
  description: Telnyx provides global communications and connectivity APIs for developers — including SIP trunking, programmable voice, SMS, MMS, WhatsApp Business Messaging, Call Control, Fax, Wireless (IoT & eSIM), Phone Numbers (DID provisioning & porting), Emergency Services, and Network APIs for private interconnects and edge connectivity. Build, scale, and manage voice, messaging, and data networks with Telnyx's carrier-grade global infrastructure and API-first platform.
  title: Telnyx Access Tokens Call Commands API
  version: 2.0.0
  x-endpoint-cost: light
servers:
- description: Version 2.0.0 of the Telnyx API
  url: https://api.telnyx.com/v2
security:
- bearerAuth: []
tags:
- description: Call Control command operations
  name: Call Commands
paths:
  /calls:
    post:
      description: 'Dial a number or SIP URI from a given connection. A successful response will include a `call_leg_id` which can be used to correlate the command with subsequent webhooks.


        **Expected Webhooks:**


        - `call.initiated`

        - `call.answered` or `call.hangup`

        - `call.hold` and `call.unhold` if the call is held/unheld

        - `call.machine.detection.ended` if `answering_machine_detection` was requested

        - `call.machine.greeting.ended` if `answering_machine_detection` was requested to detect the end of machine greeting

        - `call.machine.premium.detection.ended` if `answering_machine_detection=premium` was requested

        - `call.machine.premium.greeting.ended` if `answering_machine_detection=premium` was requested and a beep was detected

        - `call.deepfake_detection.result` if `deepfake_detection` was enabled

        - `call.deepfake_detection.error` if `deepfake_detection` was enabled and an error occurred

        - `streaming.started`, `streaming.stopped` or `streaming.failed` if `stream_url` was set


        When the `record` parameter is set to `record-from-answer`, the response will include a `recording_id` field.

        '
      operationId: DialCall
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CallRequest'
        description: Call request
        required: true
      responses:
        '200':
          $ref: '#/components/responses/RetrieveCallStatusResponseWithRecordingId'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        '500':
          $ref: '#/components/responses/InternalServerErrorResponse'
        '503':
          $ref: '#/components/responses/ServiceUnavailableResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Dial
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/ai_assistant_add_messages:
    post:
      description: Add messages to the conversation started by an AI assistant on the call.
      operationId: CallAddMessagesToAIAssistant
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AIAssistantAddMessagesRequest'
        description: AI Assistant add messages request
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Add messages to AI Assistant
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/ai_assistant_join:
    post:
      description: Add a participant to an existing AI assistant conversation. Use this command to bring an additional call leg into a running AI conversation.
      operationId: CallJoinAIAssistant
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AIAssistantJoinRequest'
        description: AI Assistant Join request
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponseWithConversationId'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Join AI Assistant Conversation
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/ai_assistant_start:
    post:
      description: 'Start an AI assistant on the call.


        **Expected Webhooks:**


        - `call.conversation.ended`

        - `call.conversation_insights.generated`

        '
      operationId: CallStartAIAssistant
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AIAssistantStartRequest'
        description: AI Assistant request
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponseWithConversationId'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Start AI Assistant
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/ai_assistant_stop:
    post:
      description: Stop an AI assistant on the call.
      operationId: CallStopAIAssistant
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AIAssistantStopRequest'
        description: AI Assistant request
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Stop AI Assistant
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/answer:
    post:
      description: 'Answer an incoming call. You must issue this command before executing subsequent commands on an incoming call.


        **Expected Webhooks:**


        - `call.answered`

        - `call.hold` and `call.unhold` if the call is held/unheld

        - `call.deepfake_detection.result` if `deepfake_detection` was enabled

        - `call.deepfake_detection.error` if `deepfake_detection` was enabled and an error occurred

        - `streaming.started`, `streaming.stopped` or `streaming.failed` if `stream_url` was set


        When the `record` parameter is set to `record-from-answer`, the response will include a `recording_id` field.

        '
      operationId: AnswerCall
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnswerRequest'
        description: Answer call request
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponseWithRecordingId'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Answer call
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/bridge:
    post:
      description: 'Bridge two call control calls.


        **Expected Webhooks:**


        - `call.bridged` for Leg A

        - `call.bridged` for Leg B

        '
      operationId: BridgeCall
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BridgeRequest'
        description: Bridge call request
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Bridge calls
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/client_state_update:
    put:
      description: Updates client state
      operationId: UpdateClientState
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientStateUpdateRequest'
        description: Updates client state for every subsequent webhook
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Update client state
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/enqueue:
    post:
      description: Put the call in a queue.
      operationId: EnqueueCall
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnqueueRequest'
        description: Enqueue call request
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Enqueue call
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/fork_start:
    post:
      description: "Call forking allows you to stream the media from a call to a specific target in realtime. \nThis stream can be used to enable realtime audio analysis to support a \nvariety of use cases, including fraud detection, or the creation of AI-generated audio responses. \nRequests must specify either the `target` attribute or the `rx` and `tx` attributes.\n\n**Expected Webhooks:**\n\n- `call.fork.started`\n- `call.fork.stopped`\n\n"
      operationId: StartCallFork
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartForkingRequest'
        description: Fork media request
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Forking start
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/fork_stop:
    post:
      description: 'Stop forking a call.


        **Expected Webhooks:**


        - `call.fork.stopped`

        '
      operationId: StopCallFork
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StopForkingRequest'
        description: Stop forking media request
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Forking stop
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/gather:
    post:
      description: 'Gather DTMF signals to build interactive menus.


        You can pass a list of valid digits. The `Answer` command must be issued before the `gather` command.


        **Expected Webhooks:**


        - `call.dtmf.received` (you may receive many of these webhooks)

        - `call.gather.ended`

        '
      operationId: GatherCall
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GatherRequest'
        description: Gather
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Gather
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/gather_stop:
    post:
      description: 'Stop current gather.


        **Expected Webhooks:**


        - `call.gather.ended`

        '
      operationId: StopCallGather
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StopGatherRequest'
        description: Stop current gather
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Gather stop
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/gather_using_ai:
    post:
      description: "Gather parameters defined in the request payload using a voice assistant.\n\n You can pass parameters described as a JSON Schema object and the voice assistant will attempt to gather these informations. \n\n**Expected Webhooks:**\n\n- `call.ai_gather.ended`\n- `call.conversation.ended`\n- `call.ai_gather.partial_results` (if `send_partial_results` is set to `true`)\n- `call.ai_gather.message_history_updated` (if `send_message_history_updates` is set to `true`)\n"
      operationId: callGatherUsingAI
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GatherUsingAIRequest'
        description: Gather using AI request
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponseWithConversationId'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Gather using AI
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/gather_using_audio:
    post:
      description: 'Play an audio file on the call until the required DTMF signals are gathered to build interactive menus.


        You can pass a list of valid digits along with an ''invalid_audio_url'', which will be played back at the beginning of each prompt. Playback will be interrupted when a DTMF signal is received. The `Answer command must be issued before the `gather_using_audio` command.


        **Expected Webhooks:**


        - `call.playback.started`

        - `call.playback.ended`

        - `call.dtmf.received` (you may receive many of these webhooks)

        - `call.gather.ended`

        '
      operationId: GatherUsingAudio
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GatherUsingAudioRequest'
        description: Gather using audio request
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Gather using audio
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/gather_using_speak:
    post:
      description: 'Convert text to speech and play it on the call until the required DTMF signals are gathered to build interactive menus.


        You can pass a list of valid digits along with an ''invalid_payload'', which will be played back at the beginning of each prompt. Speech will be interrupted when a DTMF signal is received. The `Answer` command must be issued before the `gather_using_speak` command.


        **Expected Webhooks:**


        - `call.dtmf.received` (you may receive many of these webhooks)

        - `call.gather.ended`

        '
      operationId: GatherUsingSpeak
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GatherUsingSpeakRequest'
        description: Gather using speak request
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Gather using speak
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/hangup:
    post:
      description: 'Hang up the call.


        **Expected Webhooks:**


        - `call.hangup`

        - `call.recording.saved`

        '
      operationId: HangupCall
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HangupRequest'
        description: Hangup request
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Hangup call
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/leave_queue:
    post:
      description: Removes the call from a queue.
      operationId: LeaveQueue
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LeaveQueueRequest'
        description: Removes the call from the queue, the call currently is enqueued in.
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Remove call from a queue
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/playback_start:
    post:
      description: 'Play an audio file on the call. If multiple play audio commands are issued consecutively,

        the audio files will be placed in a queue awaiting playback.


        *Notes:*


        - When `overlay` is enabled, `target_legs` is limited to `self`.

        - A customer cannot Play Audio with `overlay=true` unless there is a Play Audio with `overlay=false` actively playing.


        **Expected Webhooks:**


        - `call.playback.started`

        - `call.playback.ended`

        '
      operationId: StartCallPlayback
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlayAudioUrlRequest'
        description: Play audio URL request
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Play audio URL
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/playback_stop:
    post:
      description: 'Stop audio being played on the call.


        **Expected Webhooks:**


        - `call.playback.ended` or `call.speak.ended`

        '
      operationId: StopCallPlayback
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlaybackStopRequest'
        description: Stop audio playback request
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Stop audio playback
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/record_pause:
    post:
      description: 'Pause recording the call. Recording can be resumed via Resume recording command.


        **Expected Webhooks:**


        There are no webhooks associated with this command.

        '
      operationId: PauseCallRecording
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PauseRecordingRequest'
        description: Pause recording call request
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Record pause
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/record_resume:
    post:
      description: 'Resume recording the call.


        **Expected Webhooks:**


        There are no webhooks associated with this command.

        '
      operationId: ResumeCallRecording
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResumeRecordingRequest'
        description: Resume recording call request
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Record resume
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/record_start:
    post:
      description: 'Start recording the call. Recording will stop on call hang-up, or can be initiated via the Stop Recording command.


        **Expected Webhooks:**


        - `call.recording.saved`

        - `call.recording.transcription.saved`

        - `call.recording.error`

        '
      operationId: StartCallRecord
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartRecordingRequest'
        description: Start recording audio request
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Recording start
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/record_stop:
    post:
      description: 'Stop recording the call.


        **Expected Webhooks:**


        - `call.recording.saved`

        '
      operationId: StopCallRecording
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StopRecordingRequest'
        description: Stop recording call request
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Recording stop
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/refer:
    post:
      description: 'Initiate a SIP Refer on a Call Control call. You can initiate a SIP Refer at any point in the duration of a call.


        **Expected Webhooks:**


        - `call.refer.started`

        - `call.refer.completed`

        - `call.refer.failed`

        '
      operationId: ReferCall
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReferRequest'
        description: Refer request
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: SIP Refer a call
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/reject:
    post:
      description: 'Reject an incoming call.


        **Expected Webhooks:**


        - `call.hangup`

        '
      operationId: RejectCall
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RejectRequest'
        description: Reject request
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Reject a call
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/send_dtmf:
    post:
      description: 'Sends DTMF tones from this leg. DTMF tones will be heard by the other end of the call.


        **Expected Webhooks:**


        There are no webhooks associated with this command.

        '
      operationId: SendDTMF
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendDTMFRequest'
        description: Send DTMF request
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Send DTMF
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/send_sip_info:
    post:
      description: 'Sends SIP info from this leg.


        **Expected Webhooks:**


        - `call.sip_info.received` (to be received on the target call leg)

        '
      operationId: SendSIPInfo
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendSIPInfoRequest'
        description: Send SIP INFO request
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: Send SIP info
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/siprec_start:
    post:
      description: "Start siprec session to configured in SIPREC connector SRS. \n\n**Expected Webhooks:**\n\n- `siprec.started`\n- `siprec.stopped`\n- `siprec.failed`\n"
      operationId: StartSiprecSession
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartSiprecRequest'
        description: Start siprec session to configured in SIPREC connector SRS.
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: SIPREC start
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/siprec_stop:
    post:
      description: 'Stop SIPREC session.


        **Expected Webhooks:**


        - `siprec.stopped`

        '
      operationId: StopSiprecSession
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StopSiprecRequest'
        description: Stop siprec session
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/responses/call-control_GenericErrorResponse'
      summary: SIPREC stop
      tags:
      - Call Commands
      x-latency-category: interactive
  /calls/{call_control_id}/actions/speak:
    post:
      description: 'Convert text to speech and play it back on the call. If multiple speak text commands are issued consecutively, the audio files will be placed in a queue awaiting playback.


        **Expected Webhooks:**


        - `call.speak.started`

        - `call.speak.ended`

        '
      operationId: SpeakCall
      parameters:
      - $ref: '#/components/parameters/CallControlId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpeakRequest'
        description: Speak request
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CallControlCommandResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityResponse'
        default:
          $ref: '#/components/r

# --- truncated at 32 KB (248 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/telnyx/refs/heads/main/openapi/telnyx-call-commands-api-openapi.yml