v52

OpenAPI 3.1.0raw.githubusercontent.com2026-07-311,1941,9384.1 MB
Call Commands

Start Conversation Relay

Start a Conversation Relay session on an active call. Conversation Relay connects the call audio to your WebSocket so your application can exchange realtime messages with the caller while Telnyx handles speech recognition and text-to-speech. Only one AI Assistant or Conversation Relay session can be active on a call at a time.

Expected Webhooks:

  • call.conversation.ended - Sent when the Conversation Relay session ends. If the customer WebSocket disconnects, the webhook payload reason is customer_disconnect.
post/calls/{call_control_id}/actions/conversation_relay_start

Path parameters

call_control_idstring required

Unique identifier and token for controlling the call

Request body

OR
OR

Example request

{
  "assistant": {
    "dynamic_variables": {
      "customer_id": "12345",
      "tier": "premium"
    }
  },
  "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d",
  "command_id": "891510ac-f3e4-11e8-af5b-de00688a4901",
  "conversation_relay_dtmf_detection": true,
  "conversation_relay_settings": {
    "dtmf_detection": true,
    "interruptible": "speech",
    "interruptible_greeting": "dtmf",
    "languages": [
      {
        "language": "en-US",
        "transcription_engine": "Deepgram",
        "transcription_engine_config": {
          "transcription_model": "deepgram/nova-3"
        },
        "tts_provider": "telnyx",
        "voice": "Telnyx.KokoroTTS.af"
      }
    ],
    "url": "wss://example.com/conversation-relay"
  },
  "conversation_relay_url": "wss://example.com/conversation-relay",
  "custom_parameters": {
    "customer_id": "12345"
  },
  "dtmf_detection": true,
  "greeting": "Hi! Ask me anything!",
  "interruptible": "speech",
  "interruptible_greeting": "speech",
  "interruption_settings": {
    "interruptible": "speech",
    "interruptible_greeting": "speech",
    "welcome_greeting_interruptible": "speech"
  },
  "language": "en-US",
  "languages": [
    {
      "language": "en-US",
      "speech_model": "nova-3",
      "transcription_engine": "Google",
      "transcription_engine_config": {
        "interim_results": true,
        "keywords_boosting": {
          "telnyx": 2
        },
        "transcription_model": "deepgram/nova-3"
      },
      "transcription_provider": "Deepgram",
      "tts_provider": "telnyx",
      "voice": "Telnyx.KokoroTTS.af",
      "voice_settings": {
        "api_key_ref": "my_elevenlabs_api_key"
      }
    }
  ],
  "provider": "elevenlabs",
  "structured_provider": {
    "model_id": "Default",
    "voice_id": "voice-id"
  },
  "transcription_engine": "Google",
  "transcription_engine_config": {
    "interim_results": true,
    "keywords_boosting": {
      "telnyx": 2
    },
    "transcription_model": "deepgram/nova-3"
  },
  "tts_provider": "telnyx",
  "url": "wss://example.com/conversation-relay",
  "voice": "Telnyx.KokoroTTS.af",
  "voice_settings": {
    "api_key_ref": "my_elevenlabs_api_key"
  }
}

Response

Successful response upon starting Conversation Relay.

Example response

{
  "data": {
    "conversation_relay_id": "d7e9c1d4-8b2a-4b8f-b3a7-9a671c9e9b0a",
    "result": "ok"
  }
}