Skip to main content
WSS
Messages
Setup Frame
type:object

First frame Telnyx sends after the WebSocket connects. Identifies the relay session, call, and any custom parameters configured on the assistant.

Prompt Frame
type:object

Transcription of caller speech. Sent repeatedly during an utterance — last: false marks a partial, last: true marks the final transcript for that utterance.

DTMF Frame
type:object

Sent when a caller pressed a DTMF digit.

Interrupt Frame
type:object

Sent when the caller interrupts (barges in over) ongoing TTS playback.

Error Frame
type:object

Sent by Telnyx when a customer-sent frame is invalid or another error occurs. The connection may be closed after this frame (after 10 consecutive invalid frames, it will be).

Text Frame
type:object

Customer-to-Telnyx frame containing text to be spoken back to the caller via TTS. For streaming LLM token chunks: send each chunk as a text frame with last: false (or omit last — it defaults to false). Send last: true to finalize the turn.

Important: Omitting last defaults to false. A customer finalizing a turn must send last: true explicitly, otherwise Telnyx will keep waiting for more tokens.

Play Frame
type:object

Customer-to-Telnyx frame requesting Telnyx to play an audio file URL into the call.

Send Digits Frame
type:object

Customer-to-Telnyx frame requesting Telnyx to send DTMF digits on the call. Valid characters: 0-9, A-D, w or W (pause), #, *.

Language Frame
type:object

Customer-to-Telnyx frame requesting a language change mid-session. At least one of ttsLanguage (output TTS language) and transcriptionLanguage (input STT language) must be provided.

End Frame
type:object

Customer-to-Telnyx frame ending the ConversationRelay session gracefully. Optionally carries handoffData — an opaque string forwarded to whatever the assistant hands the call off to next.