communication
Telnyx CLI for Headless Automation
Use the Telnyx CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 6 read 1 write API key auth
Telnyx CLI for Headless Automation
Use KosmoKrator as a non-interactive integration runtime for local automations and wrappers.
Use headless automation when another tool needs a stable local command surface. The Telnyx CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Telnyx CLI for Headless Automation
kosmokrator integrations:configure telnyx --set api_key="$TELNYX_API_KEY" --enable --read allow --write ask --json
kosmo integrations:call telnyx.telnyx_list_phone_numbers '{"page_size":1,"page_number":1,"filter_phone_number":"example_filter_phone_number","filter_status":"example_filter_status"}' --json Discovery Before Execution
Agents and scripts can inspect Telnyx docs and schemas before choosing a function.
kosmo integrations:docs telnyx --json
kosmo integrations:docs telnyx.telnyx_list_phone_numbers --json
kosmo integrations:schema telnyx.telnyx_list_phone_numbers --json
kosmo integrations:search "Telnyx" --json
kosmo integrations:list --json Useful Telnyx CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
telnyx.telnyx_list_phone_numbers | Read | page_size, page_number, filter_phone_number, filter_status | List phone numbers on your Telnyx account. Returns phone number IDs, numbers in E.164 format, status, and billing details. |
telnyx.telnyx_get_phone_number | Read | phone_number_id | Get details for a specific phone number by its ID. Returns the number, status, connection, and billing information. |
telnyx.telnyx_list_messages | Read | page_size, page_number, direction, filter_source, filter_destination, filter_status | List SMS and MMS messages sent and received on your Telnyx account. Supports filtering by direction, phone number, and date range. |
telnyx.telnyx_send_sms | Write | from, to, text, subject, media_urls, use_mms | Send an SMS or MMS message via Telnyx. Provide a sender phone number (from your Telnyx account), a destination number, and the message body. |
telnyx.telnyx_list_calls | Read | page_size, page_number, filter_status | List voice calls made on your Telnyx account. Returns call session IDs, status, participants, and duration. |
telnyx.telnyx_get_call | Read | call_session_id | Get details for a specific voice call by its call session ID. Returns participants, status, duration, and call metadata. |
telnyx.telnyx_list_call_records | Read | page_size, page_number, filter_call_session_id, filter_conference_id | List call recordings stored on your Telnyx account. Returns recording IDs, associated call sessions, download URLs, duration, and creation timestamps. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.