api/python/telnyx-texml-python/SKILL.md
Build voice applications using TeXML markup language (TwiML-compatible). Manage applications, calls, conferences, recordings, queues, and streams. This skill provides Python SDK examples.
npx skillsauth add team-telnyx/telnyx-toolkit telnyx-texml-pythonInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
pip install telnyx
import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
All examples below assume client is already initialized as shown above.
Returns a list of your TeXML Applications.
GET /texml_applications
page = client.texml_applications.list()
page = page.data[0]
print(page.id)
Creates a TeXML Application.
POST /texml_applications — Required: friendly_name, voice_url
texml_application = client.texml_applications.create(
friendly_name="call-router",
voice_url="https://example.com",
)
print(texml_application.data)
Retrieves the details of an existing TeXML Application.
GET /texml_applications/{id}
texml_application = client.texml_applications.retrieve(
"1293384261075731499",
)
print(texml_application.data)
Updates settings of an existing TeXML Application.
PATCH /texml_applications/{id} — Required: friendly_name, voice_url
texml_application = client.texml_applications.update(
id="1293384261075731499",
friendly_name="call-router",
voice_url="https://example.com",
)
print(texml_application.data)
Deletes a TeXML Application.
DELETE /texml_applications/{id}
texml_application = client.texml_applications.delete(
"1293384261075731499",
)
print(texml_application.data)
Returns multiple call resources for an account.
GET /texml/Accounts/{account_sid}/Calls
response = client.texml.accounts.calls.retrieve_calls(
account_sid="account_sid",
)
print(response.calls)
Initiate an outbound TeXML call.
POST /texml/Accounts/{account_sid}/Calls — Required: To, From, ApplicationSid
response = client.texml.accounts.calls.calls(
account_sid="account_sid",
application_sid="example-app-sid",
from_="+13120001234",
to="+13121230000",
)
print(response.from_)
Returns an individual call identified by its CallSid.
GET /texml/Accounts/{account_sid}/Calls/{call_sid}
call = client.texml.accounts.calls.retrieve(
call_sid="call_sid",
account_sid="account_sid",
)
print(call.account_sid)
Update TeXML call.
POST /texml/Accounts/{account_sid}/Calls/{call_sid}
call = client.texml.accounts.calls.update(
call_sid="call_sid",
account_sid="account_sid",
)
print(call.account_sid)
Lists conference participants
GET /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participants
response = client.texml.accounts.conferences.participants.retrieve_participants(
conference_sid="conference_sid",
account_sid="account_sid",
)
print(response.end)
Dials a new conference participant
POST /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participants
response = client.texml.accounts.conferences.participants.participants(
conference_sid="conference_sid",
account_sid="account_sid",
)
print(response.account_sid)
Gets conference participant resource
GET /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participants/{call_sid_or_participant_label}
participant = client.texml.accounts.conferences.participants.retrieve(
call_sid_or_participant_label="call_sid_or_participant_label",
account_sid="account_sid",
conference_sid="conference_sid",
)
print(participant.account_sid)
Updates a conference participant
POST /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participants/{call_sid_or_participant_label}
participant = client.texml.accounts.conferences.participants.update(
call_sid_or_participant_label="call_sid_or_participant_label",
account_sid="account_sid",
conference_sid="conference_sid",
)
print(participant.account_sid)
Deletes a conference participant
DELETE /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participants/{call_sid_or_participant_label}
client.texml.accounts.conferences.participants.delete(
call_sid_or_participant_label="call_sid_or_participant_label",
account_sid="account_sid",
conference_sid="conference_sid",
)
Lists conference resources.
GET /texml/Accounts/{account_sid}/Conferences
response = client.texml.accounts.conferences.retrieve_conferences(
account_sid="account_sid",
)
print(response.conferences)
Returns a conference resource.
GET /texml/Accounts/{account_sid}/Conferences/{conference_sid}
conference = client.texml.accounts.conferences.retrieve(
conference_sid="conference_sid",
account_sid="account_sid",
)
print(conference.account_sid)
Updates a conference resource.
POST /texml/Accounts/{account_sid}/Conferences/{conference_sid}
conference = client.texml.accounts.conferences.update(
conference_sid="conference_sid",
account_sid="account_sid",
)
print(conference.account_sid)
Lists queue resources.
GET /texml/Accounts/{account_sid}/Queues
page = client.texml.accounts.queues.list(
account_sid="account_sid",
)
page = page.queues[0]
print(page.account_sid)
Creates a new queue resource.
POST /texml/Accounts/{account_sid}/Queues
queue = client.texml.accounts.queues.create(
account_sid="account_sid",
)
print(queue.account_sid)
Returns a queue resource.
GET /texml/Accounts/{account_sid}/Queues/{queue_sid}
queue = client.texml.accounts.queues.retrieve(
queue_sid="queue_sid",
account_sid="account_sid",
)
print(queue.account_sid)
Updates a queue resource.
POST /texml/Accounts/{account_sid}/Queues/{queue_sid}
queue = client.texml.accounts.queues.update(
queue_sid="queue_sid",
account_sid="account_sid",
)
print(queue.account_sid)
Delete a queue resource.
DELETE /texml/Accounts/{account_sid}/Queues/{queue_sid}
client.texml.accounts.queues.delete(
queue_sid="queue_sid",
account_sid="account_sid",
)
Returns multiple recording resources for an account.
GET /texml/Accounts/{account_sid}/Recordings.json
response = client.texml.accounts.retrieve_recordings_json(
account_sid="account_sid",
)
print(response.end)
Returns recording resource identified by recording id.
GET /texml/Accounts/{account_sid}/Recordings/{recording_sid}.json
texml_get_call_recording_response_body = client.texml.accounts.recordings.json.retrieve_recording_sid_json(
recording_sid="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
account_sid="account_sid",
)
print(texml_get_call_recording_response_body.account_sid)
Deletes recording resource identified by recording id.
DELETE /texml/Accounts/{account_sid}/Recordings/{recording_sid}.json
client.texml.accounts.recordings.json.delete_recording_sid_json(
recording_sid="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
account_sid="account_sid",
)
Returns recordings for a call identified by call_sid.
GET /texml/Accounts/{account_sid}/Calls/{call_sid}/Recordings.json
response = client.texml.accounts.calls.recordings_json.retrieve_recordings_json(
call_sid="call_sid",
account_sid="account_sid",
)
print(response.end)
Starts recording with specified parameters for call idientified by call_sid.
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Recordings.json
response = client.texml.accounts.calls.recordings_json.recordings_json(
call_sid="call_sid",
account_sid="account_sid",
)
print(response.account_sid)
Updates recording resource for particular call.
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Recordings/{recording_sid}.json
response = client.texml.accounts.calls.recordings.recording_sid_json(
recording_sid="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
account_sid="account_sid",
call_sid="call_sid",
)
print(response.account_sid)
Lists conference recordings
GET /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Recordings
response = client.texml.accounts.conferences.retrieve_recordings(
conference_sid="conference_sid",
account_sid="account_sid",
)
print(response.end)
Returns recordings for a conference identified by conference_sid.
GET /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Recordings.json
response = client.texml.accounts.conferences.retrieve_recordings_json(
conference_sid="conference_sid",
account_sid="account_sid",
)
print(response.end)
Create a TeXML secret which can be later used as a Dynamic Parameter for TeXML when using Mustache Templates in your TeXML.
POST /texml/secrets — Required: name, value
response = client.texml.secrets(
name="My Secret Name",
value="My Secret Value",
)
print(response.data)
Starts siprec session with specified parameters for call idientified by call_sid.
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Siprec.json
response = client.texml.accounts.calls.siprec_json(
call_sid="call_sid",
account_sid="account_sid",
)
print(response.account_sid)
Updates siprec session identified by siprec_sid.
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Siprec/{siprec_sid}.json
response = client.texml.accounts.calls.siprec.siprec_sid_json(
siprec_sid="siprec_sid",
account_sid="account_sid",
call_sid="call_sid",
)
print(response.account_sid)
Starts streaming media from a call to a specific WebSocket address.
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Streams.json
response = client.texml.accounts.calls.streams_json(
call_sid="call_sid",
account_sid="account_sid",
)
print(response.account_sid)
Updates streaming resource for particular call.
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Streams/{streaming_sid}.json
response = client.texml.accounts.calls.streams.streaming_sid_json(
streaming_sid="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
account_sid="account_sid",
call_sid="call_sid",
)
print(response.account_sid)
Returns multiple recording transcription resources for an account.
GET /texml/Accounts/{account_sid}/Transcriptions.json
response = client.texml.accounts.retrieve_transcriptions_json(
account_sid="account_sid",
)
print(response.end)
Returns the recording transcription resource identified by its ID.
GET /texml/Accounts/{account_sid}/Transcriptions/{recording_transcription_sid}.json
response = client.texml.accounts.transcriptions.json.retrieve_recording_transcription_sid_json(
recording_transcription_sid="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
account_sid="account_sid",
)
print(response.account_sid)
Permanently deletes a recording transcription.
DELETE /texml/Accounts/{account_sid}/Transcriptions/{recording_transcription_sid}.json
client.texml.accounts.transcriptions.json.delete_recording_transcription_sid_json(
recording_transcription_sid="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
account_sid="account_sid",
)
The following webhook events are sent to your configured webhook URL.
All webhooks include telnyx-timestamp and telnyx-signature-ed25519 headers for verification (Standard Webhooks compatible).
| Event | Description |
|-------|-------------|
| TexmlCallAnsweredWebhook | TeXML Call Answered. Webhook sent when a TeXML call is answered |
| TexmlCallCompletedWebhook | TeXML Call Completed. Webhook sent when a TeXML call is completed |
| TexmlCallInitiatedWebhook | TeXML Call Initiated. Webhook sent when a TeXML call is initiated |
| TexmlCallRingingWebhook | TeXML Call Ringing. Webhook sent when a TeXML call is ringing |
| TexmlCallAmdWebhook | TeXML Call AMD. Webhook sent when Answering Machine Detection (AMD) completes during a TeXML call |
| TexmlCallDtmfWebhook | TeXML Call DTMF. Webhook sent when a DTMF digit is received during a TeXML call |
| TexmlGatherWebhook | TeXML Gather. Webhook sent when a Gather command completes (sent to the action URL) |
| TexmlHttpRequestWebhook | TeXML HTTP Request. Webhook sent as response to an HTTP Request instruction |
| TexmlAiGatherWebhook | TeXML AI Gather. Webhook sent when AI Gather completes with transcription results |
| TexmlConferenceJoinWebhook | TeXML Conference Join. Webhook sent when a participant joins a TeXML conference |
| TexmlConferenceLeaveWebhook | TeXML Conference Leave. Webhook sent when a participant leaves a TeXML conference |
| TexmlConferenceSpeakerWebhook | TeXML Conference Speaker. Webhook sent when a participant starts or stops speaking in a TeXML conference |
| TexmlConferenceEndWebhook | TeXML Conference End. Webhook sent when a TeXML conference ends |
| TexmlConferenceStartWebhook | TeXML Conference Start. Webhook sent when a TeXML conference starts |
| TexmlQueueWebhook | TeXML Queue. Webhook sent for queue status events (triggered by Enqueue command waitUrl) |
| TexmlRecordingCompletedWebhook | TeXML Recording Completed. Webhook sent when a recording is completed during a TeXML call (triggered by recordingStatusCallbackEvent) |
| TexmlRecordingInProgressWebhook | TeXML Recording In-Progress. Webhook sent when a recording starts during a TeXML call (triggered by recordingStatusCallbackEvent) |
| TexmlSiprecWebhook | TeXML SIPREC. Webhook sent for SIPREC session status updates |
| TexmlStreamWebhook | TeXML Stream. Webhook sent for media streaming status updates |
| TexmlTranscriptionWebhook | TeXML Transcription. Webhook sent when a recording transcription is completed |
tools
Build cross-platform VoIP calling apps with React Native using Telnyx Voice SDK. High-level reactive API with automatic lifecycle management, CallKit/ConnectionService integration, and push notifications. Use for mobile VoIP apps with minimal setup.
tools
Build browser-based VoIP calling apps using Telnyx WebRTC JavaScript SDK. Covers authentication, voice calls, events, debugging, call quality metrics, and AI Agent integration. Use for web-based real-time communication.
tools
Build VoIP calling apps on iOS using Telnyx WebRTC SDK. Covers authentication, making/receiving calls, CallKit integration, PushKit/APNS push notifications, call quality metrics, and AI Agent integration. Use when implementing real-time voice communication on iOS.
tools
Build cross-platform VoIP calling apps with Flutter using Telnyx WebRTC SDK. Covers authentication, making/receiving calls, push notifications (FCM + APNS), call quality metrics, and AI Agent integration. Works on Android, iOS, and Web.