Telnyx

Learn how to use Telnyx with Composio

Overview

SLUG: TELNYX

Description

Telnyx is a communications platform offering voice, messaging, and data services through a global private network.

Authentication Details

generic_api_key
stringRequired

Connecting to Telnyx

Create an auth config

Use the dashboard to create an auth config for the Telnyx toolkit. This allows you to connect multiple Telnyx accounts to Composio for agents to use.

1

Select App

Navigate to Telnyx.

2

Configure Auth Config Settings

Select among the supported auth schemes of and configure them here.

3

Create and Get auth config ID

Click “Create Telnyx Auth Config”. After creation, copy the displayed ID starting with ac_. This is your auth config ID. This is not a sensitive ID — you can save it in environment variables or a database. This ID will be used to create connections to the toolkit for a given user.

Connect Your Account

Using API Key

1from composio import Composio
2
3# Replace these with your actual values
4telnyx_auth_config_id = "ac_YOUR_TELNYX_CONFIG_ID" # Auth config ID created above
5user_id = "0000-0000-0000" # UUID from database/app
6
7composio = Composio()
8
9def authenticate_toolkit(user_id: str, auth_config_id: str):
10 # Replace this with a method to retrieve an API key from the user.
11 # Or supply your own.
12 user_api_key = input("[!] Enter API key")
13
14 connection_request = composio.connected_accounts.initiate(
15 user_id=user_id,
16 auth_config_id=auth_config_id,
17 config={"auth_scheme": "API_KEY", "val": user_api_key}
18 )
19
20 # API Key authentication is immediate - no redirect needed
21 print(f"Successfully connected Telnyx for user {user_id}")
22 print(f"Connection status: {connection_request.status}")
23
24 return connection_request.id
25
26
27connection_id = authenticate_toolkit(user_id, telnyx_auth_config_id)
28
29# You can verify the connection using:
30connected_account = composio.connected_accounts.get(connection_id)
31print(f"Connected account: {connected_account}")

Tools

Executing tools

To prototype you can execute some tools to see the responses and working on the Telnyx toolkit’s playground

Python
1from composio import Composio
2from openai import OpenAI
3import json
4
5openai = OpenAI()
6composio = Composio()
7
8# User ID must be a valid UUID format
9user_id = "0000-0000-0000" # Replace with actual user UUID from your database
10
11tools = composio.tools.get(user_id=user_id, toolkits=["TELNYX"])
12
13print("[!] Tools:")
14print(json.dumps(tools))
15
16def invoke_llm(task = "What can you do?"):
17 completion = openai.chat.completions.create(
18 model="gpt-4o",
19 messages=[
20 {
21 "role": "user",
22 "content": task, # Your task here!
23 },
24 ],
25 tools=tools,
26 )
27
28 # Handle Result from tool call
29 result = composio.provider.handle_tool_calls(user_id=user_id, response=completion)
30 print(f"[!] Completion: {completion}")
31 print(f"[!] Tool call result: {result}")
32
33invoke_llm()

Tool List

Tool Name: Create Notification Channel

Description

Tool to create a notification channel. use when you need to register a channel (sms, voice, email, or webhook) to receive notifications. e.g., create a webhook channel for event callbacks.

Action Parameters

channel_destination
stringRequired
channel_type_id
stringRequired
notification_profile_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Network

Description

Tool to create a new network. use when you need to provision a fresh network resource before connecting devices.

Action Parameters

name
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Notification Profile

Description

Tool to create a notification profile. use when you need to register a new profile to group notification channels and define notification settings.

Action Parameters

name
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Notification Setting

Description

Tool to add a notification setting. use after creating the event condition, profile, and channel.

Action Parameters

notification_channel_id
stringRequired
notification_event_condition_id
stringRequired
notification_profile_id
stringRequired
parameters
array

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Network

Description

Tool to delete a network by id. use when you have obtained the network's identifier and need to remove it permanently.

Action Parameters

network_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Notification Channel

Description

Tool to delete a notification channel by id. use when you have the channel's identifier and need to remove it permanently.

Action Parameters

notification_channel_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Notification Profile

Description

Tool to delete a notification profile by id. use when you have the profile's identifier and need to remove it permanently.

Action Parameters

notification_profile_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Notification Setting

Description

Tool to delete a notification setting by id. use when you need to permanently remove an existing notification setting before reconfiguration.

Action Parameters

notification_setting_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get User Balance

Description

Tool to retrieve the current user account balance and credit details. use after authenticating your account to check available balance.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Audit Logs

Description

Tool to retrieve a list of audit log entries for your account. use when you need to review recent resource changes with optional pagination and date filters.

Action Parameters

filter[created_after]
string
filter[created_before]
string
page[number]
integer
page[size]
integer
sort
string

Action Response

data
arrayRequired
error
string
meta
objectRequired
successful
booleanRequired

Tool Name: List Connections

Description

Tool to retrieve all connections in your account. use when you need to list connections with pagination, filtering, and sorting.

Action Parameters

filter[connection_name][contains]
string
filter[outbound_voice_profile_id]
integer
page[number]
integerDefaults to 1
page[size]
integerDefaults to 250
sort
string

Action Response

data
arrayRequired
error
string
meta
objectRequired
successful
booleanRequired

Tool Name: List Dynamic Emergency Endpoints

Description

Tool to list dynamic emergency endpoints. use when you need to retrieve dynamic emergency endpoint records, optionally filtered by status or country. example: "list all activated endpoints in us".

Action Parameters

filter[country_code]
string
filter[status]
string
page[number]
integerDefaults to 1
page[size]
integerDefaults to 20

Action Response

data
arrayRequired
error
string
meta
objectRequired
successful
booleanRequired

Tool Name: List Messaging Profiles

Description

Tool to list messaging profiles. use when you need to retrieve messaging profiles with optional pagination.

Action Parameters

page[number]
integerDefaults to 1
page[size]
integerDefaults to 20

Action Response

data
arrayRequired
error
string
links
object
meta
objectRequired
successful
booleanRequired

Tool Name: List Messaging URL Domains

Description

Tool to list configured messaging url domains. use when you need to retrieve messaging url domains for a profile.

Action Parameters

filter[profile_id]
string
page[number]
integerDefaults to 1
page[size]
integerDefaults to 20

Action Response

data
arrayRequired
error
string
links
object
meta
objectRequired
successful
booleanRequired

Tool Name: List Mobile Network Operators

Description

Tool to list available mobile network operators. use when you need to discover operators optionally filtered by country code, operator name, or with pagination.

Action Parameters

filter[country_code]
string
filter[operator_name]
string
page[number]
integer
page[size]
integer

Action Response

data
arrayRequired
error
string
links
objectRequired
meta
objectRequired
successful
booleanRequired

Tool Name: List Networks

Description

Tool to list all networks in your account. use when you need to retrieve networks with optional pagination and filtering.

Action Parameters

filter[name]
string
page[number]
integerDefaults to 1
page[size]
integerDefaults to 20

Action Response

data
arrayRequired
error
string
meta
objectRequired
successful
booleanRequired

Tool Name: List Network Interfaces

Description

Tool to list all network interfaces for a specified network. use after retrieving a network's id to enumerate its interfaces.

Action Parameters

filter[name]
string
filter[status]
string
filter[type]
string
network_id
stringRequired
page[number]
integerDefaults to 1
page[size]
integerDefaults to 20

Action Response

data
arrayRequired
error
string
meta
objectRequired
successful
booleanRequired

Tool Name: List Notification Channels

Description

Tool to list all notification channels. use when you need to retrieve and paginate existing notification channels, optionally filtering by channel type.

Action Parameters

filter[channel_type_id][eq]
string
page[number]
integerDefaults to 1
page[size]
integerDefaults to 20

Action Response

data
arrayRequired
error
string
links
objectRequired
meta
objectRequired
successful
booleanRequired

Tool Name: List Notification Events

Description

Tool to list all notification events. use when you need to retrieve and paginate available notification events.

Action Parameters

page[number]
integerDefaults to 1
page[size]
integerDefaults to 20

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Notification Event Conditions

Description

Tool to list all notification event conditions. use when you need to retrieve and paginate notification event conditions, optionally filtering by associated record type.

Action Parameters

filter[associated_record_type][eq]
string
page[number]
integerDefaults to 1
page[size]
integerDefaults to 20

Action Response

data
arrayRequired
error
string
links
object
meta
objectRequired
successful
booleanRequired

Tool Name: List Notification Profiles

Description

Tool to list all notification profiles. use when you need to retrieve and paginate your notification profiles with optional pagination.

Action Parameters

page[number]
integerDefaults to 1
page[size]
integerDefaults to 20

Action Response

data
arrayRequired
error
string
meta
objectRequired
successful
booleanRequired

Tool Name: List Phone Numbers

Description

Tool to list phone numbers associated with your account. use when you need to retrieve and filter your phone numbers with optional pagination and sorting.

Action Parameters

filter[connection_id]
string
filter[national_destination_code]
string
filter[phone_number]
string
filter[status]
string
page[number]
integer
page[size]
integer
sort
string

Action Response

data
arrayRequired
error
string
links
object
meta
objectRequired
successful
booleanRequired

Tool Name: List SSO Authentication Providers

Description

Tool to retrieve all configured sso authentication providers. use after authenticating to enumerate your organization's sso providers.

Action Parameters

page[number]
integerDefaults to 1
page[size]
integerDefaults to 20
sort
stringDefaults to -created_at

Action Response

data
arrayRequired
error
string
meta
objectRequired
successful
booleanRequired

Tool Name: Retrieve Network

Description

Tool to retrieve details of a specific network by id. use after obtaining the network's identifier to fetch its current attributes before update or delete operations.

Action Parameters

network_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Retrieve Notification Channel

Description

Tool to retrieve a notification channel by id. use after you have a channel id and need its details, such as name, type, and status.

Action Parameters

id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Retrieve Notification Profile

Description

Tool to retrieve a notification profile by id. use after obtaining the profile id when you need details about its webhook endpoints and subscribed events.

Action Parameters

id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Retrieve Notification Setting

Description

Tool to retrieve a notification setting by id. use after obtaining the notification setting id to fetch its details, such as status, parameters, and associated channel.

Action Parameters

id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update Network

Description

Tool to update details of an existing network. use when you have a network's identifier and need to modify its name or tags.

Action Parameters

name
string
network_id
stringRequired
tags
array

Action Response

data
objectRequired
error
string
successful
booleanRequired