telnyx-mcp
v4.6.0
Published
The official MCP Server for the Telnyx API
Readme
Telnyx TypeScript MCP Server
It is generated with Stainless.
Installation
Direct invocation
You can run the MCP Server directly via npx:
export TELNYX_API_KEY="My API Key"
export TELNYX_PUBLIC_KEY="My Public Key"
npx -y telnyx-mcp@latestVia MCP Client
There is a partial list of existing clients at modelcontextprotocol.io. If you already have a client, consult their documentation to install the MCP server.
For clients with a configuration JSON, it might look something like this:
{
"mcpServers": {
"telnyx_api": {
"command": "npx",
"args": ["-y", "telnyx-mcp", "--client=claude", "--tools=dynamic"],
"env": {
"TELNYX_API_KEY": "My API Key",
"TELNYX_PUBLIC_KEY": "My Public Key"
}
}
}
}Cursor
If you use Cursor, you can install the MCP server by using the button below. You will need to set your environment variables
in Cursor's mcp.json, which can be found in Cursor Settings > Tools & MCP > New MCP Server.
VS Code
If you use MCP, you can install the MCP server by clicking the link below. You will need to set your environment variables
in VS Code's mcp.json, which can be found via Command Palette > MCP: Open User Configuration.
Claude Code
If you use Claude Code, you can install the MCP server by running the command below in your terminal. You will need to set your
environment variables in Claude Code's .claude.json, which can be found in your home directory.
claude mcp add --transport stdio telnyx_api --env TELNYX_API_KEY="Your TELNYX_API_KEY here." TELNYX_PUBLIC_KEY="Your TELNYX_PUBLIC_KEY here." -- npx -y telnyx-mcpExposing endpoints to your MCP Client
There are three ways to expose endpoints as tools in the MCP server:
- Exposing one tool per endpoint, and filtering as necessary
- Exposing a set of tools to dynamically discover and invoke endpoints from the API
- Exposing a docs search tool and a code execution tool, allowing the client to write code to be executed against the TypeScript client
Filtering endpoints and tools
You can run the package on the command line to discover and filter the set of tools that are exposed by the MCP Server. This can be helpful for large APIs where including all endpoints at once is too much for your AI's context window.
You can filter by multiple aspects:
--toolincludes a specific tool by name--resourceincludes all tools under a specific resource, and can have wildcards, e.g.my.resource*--operationincludes just read (get/list) or just write operations
Dynamic tools
If you specify --tools=dynamic to the MCP server, instead of exposing one tool per endpoint in the API, it will
expose the following tools:
list_api_endpoints- Discovers available endpoints, with optional filtering by search queryget_api_endpoint_schema- Gets detailed schema information for a specific endpointinvoke_api_endpoint- Executes any endpoint with the appropriate parameters
This allows you to have the full set of API endpoints available to your MCP Client, while not requiring that all of their schemas be loaded into context at once. Instead, the LLM will automatically use these tools together to search for, look up, and invoke endpoints dynamically. However, due to the indirect nature of the schemas, it can struggle to provide the correct properties a bit more than when tools are imported explicitly. Therefore, you can opt-in to explicit tools, the dynamic tools, or both.
See more information with --help.
All of these command-line options can be repeated, combined together, and have corresponding exclusion versions (e.g. --no-tool).
Use --list to see the list of available tools, or see below.
Code execution
If you specify --tools=code to the MCP server, it will expose just two tools:
search_docs- Searches the API documentation and returns a list of markdown resultsexecute- Runs code against the TypeScript client
This allows the LLM to implement more complex logic by chaining together many API calls without loading intermediary results into its context window.
The code execution itself happens in a Deno sandbox that has network access only to the base URL for the API.
Specifying the MCP Client
Different clients have varying abilities to handle arbitrary tools and schemas.
You can specify the client you are using with the --client argument, and the MCP server will automatically
serve tools and schemas that are more compatible with that client.
--client=<type>: Set all capabilities based on a known MCP client- Valid values:
openai-agents,claude,claude-code,cursor - Example:
--client=cursor
- Valid values:
Additionally, if you have a client not on the above list, or the client has gotten better over time, you can manually enable or disable certain capabilities:
--capability=<name>: Specify individual client capabilities- Available capabilities:
top-level-unions: Enable support for top-level unions in tool schemasvalid-json: Enable JSON string parsing for argumentsrefs: Enable support for $ref pointers in schemasunions: Enable support for union types (anyOf) in schemasformats: Enable support for format validations in schemas (e.g. date-time, email)tool-name-length=N: Set maximum tool name length to N characters
- Example:
--capability=top-level-unions --capability=tool-name-length=40 - Example:
--capability=top-level-unions,tool-name-length=40
- Available capabilities:
Examples
- Filter for read operations on cards:
--resource=cards --operation=read- Exclude specific tools while including others:
--resource=cards --no-tool=create_cards- Configure for Cursor client with custom max tool name length:
--client=cursor --capability=tool-name-length=40- Complex filtering with multiple criteria:
--resource=cards,accounts --operation=read --tag=kyc --no-tool=create_cardsRunning remotely
Launching the client with --transport=http launches the server as a remote server using Streamable HTTP transport. The --port setting can choose the port it will run on, and the --socket setting allows it to run on a Unix socket.
Authorization can be provided via the Authorization header using the Bearer scheme.
Additionally, authorization can be provided via the following headers:
| Header | Equivalent client option | Security scheme |
| ------------------ | ------------------------ | --------------- |
| x-telnyx-api-key | apiKey | bearerAuth |
A configuration JSON for this server might look like this, assuming the server is hosted at http://localhost:3000:
{
"mcpServers": {
"telnyx_api": {
"url": "http://localhost:3000",
"headers": {
"Authorization": "Bearer <auth value>"
}
}
}
}The command-line arguments for filtering tools and specifying clients can also be used as query parameters in the URL. For example, to exclude specific tools while including others, use the URL:
http://localhost:3000?resource=cards&resource=accounts&no_tool=create_cardsOr, to configure for the Cursor client, with a custom max tool name length, use the URL:
http://localhost:3000?client=cursor&capability=tool-name-length%3D40Importing the tools and server individually
// Import the server, generated endpoints, or the init function
import { server, endpoints, init } from "telnyx-mcp/server";
// import a specific tool
import createBatchDetailRecordsReportingLegacyMessaging from "telnyx-mcp/tools/legacy/reporting/batch-detail-records/messaging/create-batch-detail-records-reporting-legacy-messaging";
// initialize the server and all endpoints
init({ server, endpoints });
// manually start server
const transport = new StdioServerTransport();
await server.connect(transport);
// or initialize your own server with specific tools
const myServer = new McpServer(...);
// define your own endpoint
const myCustomEndpoint = {
tool: {
name: 'my_custom_tool',
description: 'My custom tool',
inputSchema: zodToJsonSchema(z.object({ a_property: z.string() })),
},
handler: async (client: client, args: any) => {
return { myResponse: 'Hello world!' };
})
};
// initialize the server with your custom endpoints
init({ server: myServer, endpoints: [createBatchDetailRecordsReportingLegacyMessaging, myCustomEndpoint] });Available Tools
The following tools are available in this MCP server.
Resource legacy.reporting.batch_detail_records.messaging:
create_batch_detail_records_reporting_legacy_messaging(write): Creates a new MDR detailed report request with the specified filtersretrieve_batch_detail_records_reporting_legacy_messaging(read): Retrieves a specific MDR detailed report request by IDlist_batch_detail_records_reporting_legacy_messaging(read): Retrieves all MDR detailed report requests for the authenticated userdelete_batch_detail_records_reporting_legacy_messaging(write): Deletes a specific MDR detailed report request by ID
Resource legacy.reporting.batch_detail_records.speech_to_text:
create_batch_detail_records_reporting_legacy_speech_to_text(write): Creates a new Speech to Text batch report request with the specified filtersretrieve_batch_detail_records_reporting_legacy_speech_to_text(read): Retrieves a specific Speech to Text batch report request by IDlist_batch_detail_records_reporting_legacy_speech_to_text(read): Retrieves all Speech to Text batch report requests for the authenticated userdelete_batch_detail_records_reporting_legacy_speech_to_text(write): Deletes a specific Speech to Text batch report request by ID
Resource legacy.reporting.batch_detail_records.voice:
create_batch_detail_records_reporting_legacy_voice(write): Creates a new CDR report request with the specified filtersretrieve_batch_detail_records_reporting_legacy_voice(read): Retrieves a specific CDR report request by IDlist_batch_detail_records_reporting_legacy_voice(read): Retrieves all CDR report requests for the authenticated userdelete_batch_detail_records_reporting_legacy_voice(write): Deletes a specific CDR report request by IDretrieve_fields_batch_detail_records_reporting_legacy_voice(read): Retrieves all available fields that can be used in CDR reports
Resource legacy.reporting.usage_reports:
retrieve_speech_to_text_reporting_legacy_usage_reports(read): Generate and fetch speech to text usage report synchronously. This endpoint will both generate and fetch the speech to text report over a specified time period.
Resource legacy.reporting.usage_reports.messaging:
create_usage_reports_reporting_legacy_messaging(write): Creates a new legacy usage V2 MDR report request with the specified filtersretrieve_usage_reports_reporting_legacy_messaging(read): Fetch single MDR usage report by id.list_usage_reports_reporting_legacy_messaging(read): Fetch all previous requests for MDR usage reports.delete_usage_reports_reporting_legacy_messaging(write): Deletes a specific V2 legacy usage MDR report request by ID
Resource legacy.reporting.usage_reports.number_lookup:
create_usage_reports_reporting_legacy_number_lookup(write): Submit a new telco data usage reportretrieve_usage_reports_reporting_legacy_number_lookup(read): Retrieve a specific telco data usage report by its IDlist_usage_reports_reporting_legacy_number_lookup(read): Retrieve a paginated list of telco data usage reportsdelete_usage_reports_reporting_legacy_number_lookup(write): Delete a specific telco data usage report by its ID
Resource legacy.reporting.usage_reports.voice:
create_usage_reports_reporting_legacy_voice(write): Creates a new legacy usage V2 CDR report request with the specified filtersretrieve_usage_reports_reporting_legacy_voice(read): Fetch single cdr usage report by id.list_usage_reports_reporting_legacy_voice(read): Fetch all previous requests for cdr usage reports.delete_usage_reports_reporting_legacy_voice(write): Deletes a specific V2 legacy usage CDR report request by ID
Resource oauth:
retrieve_oauth(read): Retrieve details about an OAuth consent tokengrants_oauth(write): Create an OAuth authorization grantintrospect_oauth(write): Introspect an OAuth access token to check its validity and metadataregister_oauth(write): Register a new OAuth client dynamically (RFC 7591)retrieve_authorize_oauth(read): OAuth 2.0 authorization endpoint for the authorization code flowretrieve_jwks_oauth(read): Retrieve the JSON Web Key Set for token verificationtoken_oauth(write): Exchange authorization code, client credentials, or refresh token for access token
Resource oauth_clients:
create_oauth_clients(write): Create a new OAuth clientretrieve_oauth_clients(read): Retrieve a single OAuth client by IDupdate_oauth_clients(write): Update an existing OAuth clientlist_oauth_clients(read): Retrieve a paginated list of OAuth clients for the authenticated userdelete_oauth_clients(write): Delete an OAuth client
Resource oauth_grants:
retrieve_oauth_grants(read): Retrieve a single OAuth grant by IDlist_oauth_grants(read): Retrieve a paginated list of OAuth grants for the authenticated userdelete_oauth_grants(write): Revoke an OAuth grant
Resource access_ip_address:
create_access_ip_address(write): Create new Access IP Addressretrieve_access_ip_address(read): Retrieve an access IP addresslist_access_ip_address(read): List all Access IP Addressesdelete_access_ip_address(write): Delete access IP address
Resource access_ip_ranges:
create_access_ip_ranges(write): Create new Access IP Rangelist_access_ip_ranges(read): List all Access IP Rangesdelete_access_ip_ranges(write): Delete access IP ranges
Resource actions.purchase:
create_actions_purchase(write): Purchases and registers the specified amount of eSIMs to the current user's account. If sim_card_group_id is provided, the eSIMs will be associated with that group. Otherwise, the default group for the current user will be used.
Resource actions.register:
create_actions_register(write): Register the SIM cards associated with the provided registration codes to the current user's account. If sim_card_group_id is provided, the SIM cards will be associated with that group. Otherwise, the default group for the current user will be used.
Resource addresses:
create_addresses(write): Creates an address.retrieve_addresses(read): Retrieves the details of an existing address.list_addresses(read): Returns a list of your addresses.delete_addresses(write): Deletes an existing address.
Resource addresses.actions:
accept_suggestions_addresses_actions(write): Accepts this address suggestion as a new emergency address for Operator Connect and finishes the uploads of the numbers associated with it to Microsoft.validate_addresses_actions(write): Validates an address for emergency services.
Resource advanced_orders:
create_advanced_orders(write): Create Advanced Orderretrieve_advanced_orders(read): Get Advanced Orderlist_advanced_orders(read): List Advanced Ordersupdate_requirement_group_advanced_orders(write): Update Advanced Order
Resource ai:
retrieve_models_ai(read): This endpoint returns a list of Open Source and OpenAI models that are available for use. Note: Modelid's will be in the form{source}/{model_name}. For exampleopenai/gpt-4ormistralai/Mistral-7B-Instruct-v0.1consistent with HuggingFace naming conventions.summarize_ai(write): Generate a summary of a file's contents.Supports the following text formats:
- PDF, HTML, txt, json, csv
Supports the following media formats (billed for both the transcription and summary):
- flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm
- Up to 100 MB
Resource ai.assistants:
create_ai_assistants(write): Create a new AI Assistant.retrieve_ai_assistants(read): Retrieve an AI Assistant configuration byassistant_id.update_ai_assistants(write): Update an AI Assistant's attributes.list_ai_assistants(read): Retrieve a list of all AI Assistants configured by the user.delete_ai_assistants(write): Delete an AI Assistant byassistant_id.chat_ai_assistants(write): This endpoint allows a client to send a chat message to a specific AI Assistant. The assistant processes the message and returns a relevant reply based on the current conversation context. Refer to the Conversation API to create a conversation, filter existing conversations, fetch messages for a conversation, and manually add messages to a conversation.clone_ai_assistants(write): Clone an existing assistant, excluding telephony and messaging settings.get_texml_ai_assistants(read): Get an assistant texml byassistant_id.import_ai_assistants(write): Import assistants from external providers. Any assistant that has already been imported will be overwritten with its latest version from the importing provider.send_sms_ai_assistants(write): Send an SMS message for an assistant. This endpoint:- Validates the assistant exists and has messaging profile configured
- If should_create_conversation is true, creates a new conversation with metadata
- Sends the SMS message (If
textis set, this will be sent. Otherwise, if this is the first message in the conversation and the assistant has agreetingconfigured, this will be sent. Otherwise the assistant will generate the text to send.) - Updates conversation metadata if provided
- Returns the conversation ID
Resource ai.assistants.tests:
create_assistants_ai_tests(write): Creates a comprehensive test configuration for evaluating AI assistant performanceretrieve_assistants_ai_tests(read): Retrieves detailed information about a specific assistant testupdate_assistants_ai_tests(write): Updates an existing assistant test configuration with new settingslist_assistants_ai_tests(read): Retrieves a paginated list of assistant tests with optional filtering capabilitiesdelete_assistants_ai_tests(write): Permanently removes an assistant test and all associated data
Resource ai.assistants.tests.test_suites:
list_tests_assistants_ai_test_suites(read): Retrieves a list of all distinct test suite names available to the current user
Resource ai.assistants.tests.test_suites.runs:
list_test_suites_tests_assistants_ai_runs(read): Retrieves paginated history of test runs for a specific test suite with filtering optionstrigger_test_suites_tests_assistants_ai_runs(write): Executes all tests within a specific test suite as a batch operation
Resource ai.assistants.tests.runs:
retrieve_tests_assistants_ai_runs(read): Retrieves detailed information about a specific test run executionlist_tests_assistants_ai_runs(read): Retrieves paginated execution history for a specific assistant test with filtering optionstrigger_tests_assistants_ai_runs(write): Initiates immediate execution of a specific assistant test
Resource ai.assistants.canary_deploys:
create_assistants_ai_canary_deploys(write): Endpoint to create a canary deploy configuration for an assistant.Creates a new canary deploy configuration with multiple version IDs and their traffic percentages for A/B testing or gradual rollouts of assistant versions.
retrieve_assistants_ai_canary_deploys(read): Endpoint to get a canary deploy configuration for an assistant.Retrieves the current canary deploy configuration with all version IDs and their traffic percentages for the specified assistant.
update_assistants_ai_canary_deploys(write): Endpoint to update a canary deploy configuration for an assistant.Updates the existing canary deploy configuration with new version IDs and percentages. All old versions and percentages are replaces by new ones from this request.
delete_assistants_ai_canary_deploys(write): Endpoint to delete a canary deploy configuration for an assistant.Removes all canary deploy configurations for the specified assistant.
Resource ai.assistants.scheduled_events:
create_assistants_ai_scheduled_events(write): Create a scheduled event for an assistantretrieve_assistants_ai_scheduled_events(read): Retrieve a scheduled event by event IDlist_assistants_ai_scheduled_events(read): Get scheduled events for an assistant with pagination and filteringdelete_assistants_ai_scheduled_events(write): If the event is pending, this will cancel the event. Otherwise, this will simply remove the record of the event.
Resource ai.assistants.tools:
test_assistants_ai_tools(write): Test a webhook tool for an assistant
Resource ai.assistants.versions:
retrieve_assistants_ai_versions(read): Retrieves a specific version of an assistant by assistant_id and version_idupdate_assistants_ai_versions(write): Updates the configuration of a specific assistant version. Can not update main versionlist_assistants_ai_versions(read): Retrieves all versions of a specific assistant with complete configuration and metadatadelete_assistants_ai_versions(write): Permanently removes a specific version of an assistant. Can not delete main versionpromote_assistants_ai_versions(write): Promotes a specific version to be the main/current version of the assistant. This will delete any existing canary deploy configuration and send all live production traffic to this version.
Resource ai.audio:
transcribe_ai_audio(write): Transcribe speech to text. This endpoint is consistent with the OpenAI Transcription API and may be used with the OpenAI JS or Python SDK.
Resource ai.chat:
create_completion_ai_chat(write): Chat with a language model. This endpoint is consistent with the OpenAI Chat Completions API and may be used with the OpenAI JS or Python SDK.
Resource ai.clusters:
retrieve_ai_clusters(read): Fetch a clusterlist_ai_clusters(read): List all clustersdelete_ai_clusters(write): Delete a clustercompute_ai_clusters(write): Starts a background task to compute how the data in an embedded storage bucket is clustered. This helps identify common themes and patterns in the data.fetch_graph_ai_clusters(read): Fetch a cluster visualization
Resource ai.conversations:
create_ai_conversations(write): Create a new AI Conversation.retrieve_ai_conversations(read): Retrieve a specific AI conversation by its ID.update_ai_conversations(write): Update metadata for a specific conversation.list_ai_conversations(read): Retrieve a list of all AI conversations configured by the user. Supports PostgREST-style query parameters for filtering. Examples are included for the standard metadata fields, but you can filter on any field in the metadata JSON object. For example, to filter by a custom fieldmetadata->custom_field, usemetadata->custom_field=eq.value.delete_ai_conversations(write): Delete a specific conversation by its ID.add_message_ai_conversations(write): Add a new message to the conversation. Used to insert a new messages to a conversation manually ( without using chat endpoint )retrieve_conversations_insights_ai_conversations(read): Retrieve insights for a specific conversation
Resource ai.conversations.insight_groups:
retrieve_conversations_ai_insight_groups(read): Get insight group by IDupdate_conversations_ai_insight_groups(write): Update an insight template groupdelete_conversations_ai_insight_groups(write): Delete insight group by IDinsight_groups_conversations_ai_insight_groups(write): Create a new insight groupretrieve_insight_groups_conversations_ai_insight_groups(read): Get all insight groups
Resource ai.conversations.insight_groups.insights:
assign_insight_groups_conversations_ai_insights(write): Assign an insight to a groupdelete_unassign_insight_groups_conversations_ai_insights(write): Remove an insight from a group
Resource ai.conversations.insights:
create_conversations_ai_insights(write): Create a new insightretrieve_conversations_ai_insights(read): Get insight by IDupdate_conversations_ai_insights(write): Update an insight templatelist_conversations_ai_insights(read): Get all insightsdelete_conversations_ai_insights(write): Delete insight by ID
Resource ai.conversations.messages:
list_conversations_ai_messages(read): Retrieve messages for a specific conversation, including tool calls made by the assistant.
Resource ai.embeddings:
create_ai_embeddings(write): Perform embedding on a Telnyx Storage Bucket using the a embedding model. The current supported file types are:- HTML
- txt/unstructured text files
- json
- csv
- audio / video (mp3, mp4, mpeg, mpga, m4a, wav, or webm ) - Max of 100mb file size.
Any files not matching the above types will be attempted to be embedded as unstructured text.
This process can be slow, so it runs in the background and the user can check the status of the task using the endpoint
/ai/embeddings/{task_id}.Important Note: When you update documents in a Telnyx Storage bucket, their associated embeddings are automatically kept up to date. If you add or update a file, it is automatically embedded. If you delete a file, the embeddings are deleted for that particular file.
You can also specify a custom
loaderparam. Currently the only supported loader value isintercomwhich loads Intercom article jsons as specified by the Intercom article API This loader will split each article into paragraphs and save additional parameters relevant to Intercom docs, such asarticle_urlandheading. These values will be returned by the/v2/ai/embeddings/similarity-searchendpoint in theloader_metadatafield.retrieve_ai_embeddings(read): Check the status of a current embedding task. Will be one of the following:queued- Task is waiting to be picked up by a workerprocessing- The embedding task is runningsuccess- Task completed successfully and the bucket is embeddedfailure- Task failed and no files were embedded successfullypartial_success- Some files were embedded successfully, but at least one failed
list_ai_embeddings(read): Retrieve tasks for the user that are eitherqueued,processing,failed,successorpartial_successbased on the query string. Defaults toqueuedandprocessing.similarity_search_ai_embeddings(write): Perform a similarity search on a Telnyx Storage Bucket, returning the most similarnum_docsdocument chunks to the query.Currently the only available distance metric is cosine similarity which will return a
distancebetween 0 and 1. The lower the distance, the more similar the returned document chunks are to the query. Acertaintywill also be returned, which is a value between 0 and 1 where the higher the certainty, the more similar the document. You can read more about Weaviate distance metrics here: Weaviate DocsIf a bucket was embedded using a custom loader, such as
intercom, the additional metadata will be returned in theloader_metadatafield.url_ai_embeddings(write): Embed website content from a specified URL, including child pages up to 5 levels deep within the same domain. The process crawls and loads content from the main URL and its linked pages into a Telnyx Cloud Storage bucket. As soon as each webpage is added to the bucket, its content is immediately processed for embeddings, that can be used for similarity search and clustering.
Resource ai.embeddings.buckets:
retrieve_embeddings_ai_buckets(read): Get all embedded files for a given user bucket, including their processing status.list_embeddings_ai_buckets(read): Get all embedding buckets for a user.delete_embeddings_ai_buckets(write): Deletes an entire bucket's embeddings and disables the bucket for AI-use, returning it to normal storage pricing.
Resource ai.fine_tuning.jobs:
create_fine_tuning_ai_jobs(write): Create a new fine tuning job.retrieve_fine_tuning_ai_jobs(read): Retrieve a fine tuning job byjob_id.list_fine_tuning_ai_jobs(read): Retrieve a list of all fine tuning jobs created by the user.cancel_fine_tuning_ai_jobs(write): Cancel a fine tuning job.
Resource ai.integrations:
retrieve_ai_integrations(read): Retrieve integration detailslist_ai_integrations(read): List all available integrations.
Resource ai.integrations.connections:
retrieve_integrations_ai_connections(read): Get user setup integrationslist_integrations_ai_connections(read): List user setup integrationsdelete_integrations_ai_connections(write): Delete a specific integration connection.
Resource ai.mcp_servers:
create_ai_mcp_servers(write): Create a new MCP server.retrieve_ai_mcp_servers(read): Retrieve details for a specific MCP server.update_ai_mcp_servers(write): Update an existing MCP server.list_ai_mcp_servers(read): Retrieve a list of MCP servers.delete_ai_mcp_servers(write): Delete a specific MCP server.
Resource audit_events:
list_audit_events(read): Retrieve a list of audit log entries. Audit logs are a best-effort, eventually consistent record of significant account-related changes.
Resource authentication_providers:
create_authentication_providers(write): Creates an authentication provider.retrieve_authentication_providers(read): Retrieves the details of an existing authentication provider.update_authentication_providers(write): Updates settings of an existing authentication provider.list_authentication_providers(read): Returns a list of your SSO authentication providers.delete_authentication_providers(write): Deletes an existing authentication provider.
Resource available_phone_number_blocks:
list_available_phone_number_blocks(read): List available phone number blocks
Resource available_phone_numbers:
list_available_phone_numbers(read): List available phone numbers
Resource balance:
retrieve_balance(read): Get user balance details
Resource billing_groups:
create_billing_groups(write): Create a billing groupretrieve_billing_groups(read): Get a billing groupupdate_billing_groups(write): Update a billing grouplist_billing_groups(read): List all billing groupsdelete_billing_groups(write): Delete a billing group
Resource brand:
create_brand(write): This endpoint is used to create a new brand. A brand is an entity created by The Campaign Registry (TCR) that represents an organization or a company. It is this entity that TCR created campaigns will be associated with. Each brand creation will entail an upfront, non-refundable $4 expense.retrieve_brand(read): Retrieve a brand bybrandId.update_brand(write): Update a brand's attributes bybrandId.list_brand(read): This endpoint is used to list all brands associated with your organization.delete_brand(write): Delete Brand. This endpoint is used to delete a brand. Note the brand cannot be deleted if it contains one or more active campaigns, the campaigns need to be inactive and at least 3 months old due to billing purposes.get_feedback_brand(read): Get feedback about a brand by ID. This endpoint can be used after creating or revetting a brand.Possible values for
.category[].id:TAX_ID- Data mismatch related to tax id and its associated properties.STOCK_SYMBOL- Non public entity registered as a public for profit entity or the stock information mismatch.GOVERNMENT_ENTITY- Non government entity registered as a government entity. Must be a U.S. government entity.NONPROFIT- Not a recognized non-profit entity. No IRS tax-exempt status found.OTHERS- Details of the data misrepresentation if any.
resend_2fa_email_brand(write): Resend brand 2FA emailrevet_brand(write): This operation allows you to revet the brand. However, revetting is allowed once after the successful brand registration and thereafter limited to once every 3 months.
Resource brand.external_vetting:
list_brand_external_vetting(read): Get list of valid external vetting record for a given brandimport_brand_external_vetting(write): This operation can be used to import an external vetting record from a TCR-approved vetting provider. If the vetting provider confirms validity of the record, it will be saved with the brand and will be considered for future campaign qualification.order_brand_external_vetting(write): Order new external vetting for a brand
Resource bulk_sim_card_actions:
retrieve_bulk_sim_card_actions(read): This API fetches information about a bulk SIM card action. A bulk SIM card action contains details about a collection of individual SIM card actions.list_bulk_sim_card_actions(read): This API lists a paginated collection of bulk SIM card actions. A bulk SIM card action contains details about a collection of individual SIM card actions.
Resource bundle_pricing.billing_bundles:
retrieve_bundle_pricing_billing_bundles(read): Get a single bundle by ID.list_bundle_pricing_billing_bundles(read): Get all allowed bundles.
Resource bundle_pricing.user_bundles:
create_bundle_pricing_user_bundles(write): Creates multiple user bundles for the user.retrieve_bundle_pricing_user_bundles(read): Retrieves a user bundle by its ID.list_bundle_pricing_user_bundles(read): Get a paginated list of user bundles.deactivate_bundle_pricing_user_bundles(write): Deactivates a user bundle by its ID.list_resources_bundle_pricing_user_bundles(read): Retrieves the resources of a user bundle by its ID.list_unused_bundle_pricing_user_bundles(read): Returns all user bundles that aren't in use.
Resource call_control_applications:
create_call_control_applications(write): Create a call control application.retrieve_call_control_applications(read): Retrieves the details of an existing call control application.update_call_control_applications(write): Updates settings of an existing call control application.list_call_control_applications(read): Return a list of call control applications.delete_call_control_applications(write): Deletes a call control application.
Resource call_events:
list_call_events(read): Filters call events by given filter parameters. Events are ordered byoccurred_at. If filter forleg_idorapplication_session_idis not present, it only filters events from the last 24 hours.Note: Only one
filter[occurred_at]can be passed.
Resource calls:
dial_calls(write): Dial a number or SIP URI from a given connection. A successful response will include acall_leg_idwhich can be used to correlate the command with subsequent webhooks.Expected Webhooks:
call.initiatedcall.answeredorcall.hangupcall.machine.detection.endedifanswering_machine_detectionwas requestedcall.machine.greeting.endedifanswering_machine_detectionwas requested to detect the end of machine greetingcall.machine.premium.detection.endedifanswering_machine_detection=premiumwas requestedcall.machine.premium.greeting.endedifanswering_machine_detection=premiumwas requested and a beep was detectedstreaming.started,streaming.stoppedorstreaming.failedifstream_urlwas set
When the
recordparameter is set torecord-from-answer, the response will include arecording_idfield.retrieve_status_calls(read): Returns the status of a call (data is available 10 minutes after call ended).
Resource calls.actions:
answer_calls_actions(write): Answer an incoming call. You must issue this command before executing subsequent commands on an incoming call.Expected Webhooks:
call.answeredstreaming.started,streaming.stoppedorstreaming.failedifstream_urlwas set
When the
recordparameter is set torecord-from-answer, the response will include arecording_idfield.bridge_calls_actions(write): Bridge two call control calls.Expected Webhooks:
call.bridgedfor Leg Acall.bridgedfor Leg B
enqueue_calls_actions(write): Put the call in a queue.gather_calls_actions(write): Gather DTMF signals to build interactive menus.You can pass a list of valid digits. The
Answercommand must be issued before thegathercommand.Expected Webhooks:
call.dtmf.received(you may receive many of these webhooks)call.gather.ended
gather_using_ai_calls_actions(write): Gather parameters defined in the request payload using a voice assistant.You can pass parameters described as a JSON Schema object and the voice assistant will attempt to gather these informations.
Expected Webhooks:
call.ai_gather.endedcall.conversation.endedcall.ai_gather.partial_results(ifsend_partial_resultsis set totrue)call.ai_gather.message_history_updated(ifsend_message_history_updatesis set totrue)
gather_using_audio_calls_actions(write): Play an audio file on the call until the required DTMF signals are gathered to build interactive menus.You can pass a list of valid digits along with an 'invalid_audio_url', which will be played back at the beginning of each prompt. Playback will be interrupted when a DTMF signal is received. The
Answer command must be issued before thegather_using_audio` command.Expected Webhooks:
call.playback.startedcall.playback.endedcall.dtmf.received(you may receive many of these webhooks)call.gather.ended
gather_using_speak_calls_actions(write): Convert text to speech and play it on the call until the required DTMF signals are gathered to build interactive menus.You can pass a list of valid digits along with an 'invalid_payload', which will be played back at the beginning of each prompt. Speech will be interrupted when a DTMF signal is received. The
Answercommand must be issued before thegather_using_speakcommand.Expected Webhooks:
call.dtmf.received(you may receive many of these webhooks)call.gather.ended
hangup_calls_actions(write): Hang up the call.Expected Webhooks:
call.hangupcall.recording.saved
leave_queue_calls_actions(write): Removes the call from a queue.pause_recording_calls_actions(write): Pause recording the call. Recording can be resumed via Resume recording command.Expected Webhooks:
There are no webhooks associated with this command.
refer_calls_actions(write): Initiate a SIP Refer on a Call Control call. You can initiate a SIP Refer at any point in the duration of a call.Expected Webhooks:
call.refer.startedcall.refer.completedcall.refer.failed
reject_calls_actions(write): Reject an incoming call.Expected Webhooks:
call.hangup
resume_recording_calls_actions(write): Resume recording the call.Expected Webhooks:
There are no webhooks associated with this command.
send_dtmf_calls_actions(write): Sends DTMF tones from this leg. DTMF tones will be heard by the other end of the call.Expected Webhooks:
There are no webhooks associated with this command.
send_sip_info_calls_actions(write): Sends SIP info from this leg.Expected Webhooks:
call.sip_info.received(to be received on the target call leg)
speak_calls_actions(write): Convert text to speech and play it back on the call. If multiple speak text commands are issued consecutively, the audio files will be placed in a queue awaiting playback.Expected Webhooks:
call.speak.startedcall.speak.ended
start_ai_assistant_calls_actions(write): Start an AI assistant on the call.Expected Webhooks:
call.conversation.endedcall.conversation_insights.generated
start_forking_calls_actions(write): Call forking allows you to stream the media from a call to a specific target in realtime. This stream can be used to enable realtime audio analysis to support a variety of use cases, including fraud detection, or the creation of AI-generated audio responses. Requests must specify either thetargetattribute or therxandtxattributes.Expected Webhooks:
call.fork.startedcall.fork.stopped
start_noise_suppression_calls_actions(write): Noise Suppression Start (BETA)start_playback_calls_actions(write): Play an audio file on the call. If multiple play audio commands are issued consecutively, the audio files will be placed in a queue awaiting playback.Notes:
- When
overlayis enabled,target_legsis limited toself. - A customer cannot Play Audio with
overlay=trueunless there is a Play Audio withoverlay=falseactively playing.
Expected Webhooks:
call.playback.startedcall.playback.ended
- When
start_recording_calls_actions(write): Start recording the call. Recording will stop on call hang-up, or can be initiated via the Stop Recording command.Expected Webhooks:
call.recording.savedcall.recording.transcription.savedcall.recording.error
start_siprec_calls_actions(write): Start siprec session to configured in SIPREC connector SRS.Expected Webhooks:
siprec.startedsiprec.stoppedsiprec.failed
start_streaming_calls_actions(write): Start streaming the media from a call to a specific WebSocket address or Dialogflow connection in near-realtime. Audio will be delivered as base64-encoded RTP payload (raw audio), wrapped in JSON payloads.Please find more details about media streaming messages specification under the link.
start_transcription_calls_actions(write): Start real-time transcription. Transcription will stop on call hang-up, or can be initiated via the Transcription stop command.Expected Webhooks:
call.transcription
stop_ai_assistant_calls_actions(write): Stop an AI assistant on the call.stop_forking_calls_actions(write): Stop forking a call.Expected Webhooks:
call.fork.stopped
stop_gather_calls_actions(write): Stop current gather.Expected Webhooks:
call.gather.ended
stop_noise_suppression_calls_actions(write): Noise Suppression Stop (BETA)stop_playback_calls_actions(write): Stop audio being played on the call.Expected Webhooks:
call.playback.endedorcall.speak.ended
stop_recording_calls_actions(write): Stop recording the call.Expected Webhooks:
call.recording.saved
stop_siprec_calls_actions(write): Stop SIPREC session.Expected Webhooks:
siprec.stopped
stop_streaming_calls_actions(write): Stop streaming a call to a WebSocket.Expected Webhooks:
streaming.stopped
stop_transcription_calls_actions(write): Stop real-time transcription.switch_supervisor_role_calls_actions(write): Switch the supervisor role for a bridged call. This allows switching between different supervisor modes during an active calltransfer_calls_actions(write): Transfer a call to a new destination. If the transfer is unsuccessful, acall.hangupwebhook for the other call (Leg B) will be sent indicating that the transfer could not be completed. The original call will remain active and may be issued additional commands, potentially transfering the call to an alternate destination.Expected Webhooks:
call.initiatedcall.bridgedto Leg Bcall.answeredorcall.hangupcall.machine.detection.endedifanswering_machine_detectionwas requestedcall.machine.greeting.endedifanswering_machine_detectionwas requested to detect the end of machine greetingcall.machine.premium.detection.endedifanswering_machine_detection=premiumwas requestedcall.machine.premium.greeting.endedifanswering_machine_detection=premiumwas requested and a beep was detected
update_client_state_calls_actions(write): Updates client state
Resource campaign:
retrieve_campaign(read): Retrieve campaign details bycampaignId.update_campaign(write): Update a campaign's properties bycampaignId. Please note: only sample messages are editable.list_campaign(read): Retrieve a list of campaigns associated with a suppliedbrandId.accept_sharing_campaign(write): Manually accept a campaign shared with Telnyxdeactivate_campaign(write): Terminate a campaign. Note that once deactivated, a campaign cannot be restored.get_mno_metadata_campaign(read): Get the campaign metadata for each MNO it was submitted to.get_operation_status_campaign(read): Retrieve campaign's operation status at MNO level.get_sharing_status_campaign(read): Get Sharing Statussubmit_appeal_campaign(write): Submits an appeal for rejected native campaigns in TELNYX_FAILED or MNO_REJECTED status. The appeal is recorded for manual compliance team review and the campaign status is reset to TCR_ACCEPTED. Note: Appeal forwarding is handled manually to allow proper review before incurring upstream charges.
Resource campaign.usecase:
get_cost_campaign_usecase(read): Get Campaign Cost
Resource campaign.osr:
get_attributes_campaign_osr(read): Get My Osr Campaign Attributes
Resource campaign_builder:
create_campaign_builder(write): Before creating a campaign, use the Qualify By Usecase endpoint to ensure that the brand you want to assign a new campaign to is qualified for the desired use case of that campaign. Please note: After campaign creation, you'll only be able to edit the campaign's sample messages. Creating a campaign will entail an upfront, non-refundable three month's cost that will depend on the campaign's use case (see 10DLC Costs section for details).
Resource campaign_builder.brand:
qualify_by_usecase_campaign_builder_brand(read): This endpoint allows you to see whether or not the supplied brand is suitable for your desired campaign use case.
Resource channel_zones:
update_channel_zones(write): Update the number of Voice Channels for the Non-US Zones. This allows your account to handle multiple simultaneous inbound calls to Non-US numbers. Use this endpoint to increase or decrease your capacity based on expected call volume.list_channel_zones(read): Returns the non-US voice channels for your account. voice channels allow you to use Channel Billing for calls to your Telnyx phone numbers. Please check the Telnyx Support Articles section for full information and examples of how to utilize Channel Billing.
Resource charges_breakdown:
retrieve_charges_breakdown(read): Retrieve a detailed breakdown of monthly charges for phone numbers in a specified date range. The date range cannot exceed 31 days.
Resource charges_summary:
retrieve_charges_summary(read): Retrieve a summary of monthly charges for a specified date range. The date range cannot exceed 31 days.
Resource comments:
create_comments(write): Create a commentretrieve_comments(read): Retrieve a commentlist_comments(read): Retrieve all commentsmark_as_read_comments(write): Mark a comment as read
Resource conferences:
create_conferences(write): Create a conference from an existing call leg using acall_control_idand a conference name. Upon creating the conference, the call will be automatically bridged to the conference. Conferences will expire after all participants have left the conference or after 4 hours regardless of the number of active participants.Expected Webhooks:
conference.createdconference.participant.joinedconference.participant.leftconference.endedconference.recording.savedconference.floor.changed
retrieve_conferences(read): Retrieve an existing conferencelist_conferences(read): Lists conferences. Conferences are created on demand, and will expire after all participants have left the conference or after 4 hours regardless of the number of active participants. Conferences are listed in descending order byexpires_at.list_participants_conferences(read): Lists conference participants
Resource conferences.actions:
update_conferences_actions(write): Update conference participant supervisor_rolehold_conferences_actions(write): Hold a list of participants in a conference calljoin_conferences_actions(write): Join an existing call leg to a conference. Issue the Join Conference command with the conference ID in the path and thecall_control_idof the leg you wish to join to the conference as an attribute. The conference can have up to a certain amount of active participants, as set by themax_participantsparameter in conference creation request.Expected Webhooks:
conference.participant.joinedconference.participant.left
leave_conferences_actions(write): Removes a call leg from a conference and moves it back to parked state.Expected Webhooks:
conference.participant.left
mute_conferences_actions(write): Mute a list of participants in a conference callplay_conferences_actions(write): Play audio to all or some participants on a conference call.record_pause_conferences_actions(write): Pause conference recording.record_resume_conferences_actions(write): Resume conference recording.record_start_conferences_actions(write): Start recording the conference. Recording will stop on conference end, or via the Stop Recording command.Expected Webhooks:
conference.recording.saved
record_stop_conferences_actions(write): Stop recording the conference.Expected Webhooks:
conference.recording.saved
speak_conferences_actions(write): Convert text to speech and play it to all or some participants.stop_conferences_actions(write): Stop audio being played to all or some participants on a conference call.unhold_conferences_actions(write): Unhold a list of participants in a conference callunmute_conferences_actions(write): Unmute a list of participants in a conference call
Resource connections:
retrieve_connections(read): Retrieves the high-level details of an existing connection. To retrieve specific authentication information, use the endpoint for the specific connection type.list_connections(read): Returns a list of your connections irrespective of type.list_active_calls_connections(read): Lists all active calls for given connection. Acceptable connections are either SIP connections with webhook_url or xml_request_url, call control or texml. Returned results are cursor paginated.
Resource country_coverage:
retrieve_country_coverage(read): Get country coverageretrieve_country_country_coverage(read): Get coverage for a specific country
Resource credential_connections:
create_credential_connections(write): Creates a credential connection.retrieve_credential_connections(read): Retrieves the details of an existing credential connection.update_credential_connections(write): Updates settings of an existing credential connection.list_credential_connections(read): Returns a list of your credential connections.delete_credential_connections(write): Deletes an existing credential connection.
Resource credential_connections.actions:
check_registration_status_credential_connections_actions(write): Checks the registration_status for a credential connection, (registration_status) as well as the timestamp for the last SIP registration event (registration_status_updated_at)
Resource custom_storage_credentials:
create_custom_storage_credentials(write): Creates a custom storage credentials configuration.retrieve_custom_storage_credentials(read): Returns the information about custom storage credentials.update_custom_storage_credentials(write): Updates a stored custom credentials configuration.delete_custom_storage_credentials(write): Deletes a stored custom credentials configuration.
Resource customer_service_records:
create_customer_service_records(write): Create a new customer service record for the provided phone number.retrieve_customer_service_records(read): Get a specific customer service record.list_customer_service_records(read): List customer service records.verify_phone_number_coverage_customer_service_records(write): Verify the coverage for a list of phone numbers.
Resource detail_records:
list_detail_records(read): Search for any detail record across the Telnyx Platform
Resource dialogflow_connections:
create_dialogflow_connections(write): Save Dialogflow Credentiails to Telnyx, so it can be used with other Telnyx services.retrieve_dialogflow_connections(read): Return details of the Dialogflow connection associated with the given CallControl connection.update_dialogflow_connections(write): Updates a stored Dialogflow Connection.delete_dialogflow_connections(write): Deletes a stored Dialogflow Connection.
Resource document_links:
list_document_links(read): List all documents links ordered by created_at descending.
Resource documents:
retrieve_documents(read): Retrieve a document.update_documents(write): Update a document.list_documents(read): List all documents ordered by created_at descending.delete_documents(write): Delete a document.A document can only be deleted if it's not linked to a service. If it is linked to a service, it must be unlinked prior to deleting.download_documents(read): Download a document.generate_download_link_documents(read): Generates a temporary pre-signed URL that can be used to download the document directly from the storage backend without authentication.upload_documents(write): Upload a document.Uploaded files must be linked to a service within 30 minutes or they will be automatically deleted.upload_json_documents(write): Upload a document.Uploaded files must be linked to a service within 30 minutes or they will be automatically deleted.
Resource dynamic_emergency_addresses:
create_dynamic_emergency_addresses(write): Creates a dynamic emergency address.retrieve_dynamic_emergency_addresses(read): Returns the dynamic emergency address based on the ID providedlist_dynamic_emergency_addresses(read): Returns the dynamic emergency addresses according to filtersdelete_dynamic_emergency_addresses(write): Deletes the dynamic emergency address based on the ID provided
Resource dynamic_emergency_endpoints:
create_dynamic_emergency_endpoints(write): Creates a dynamic emergency endpoints.retrieve_dynamic_emergency_endpoints(read): Returns the dynamic emergency endpoint based on the ID providedlist_dynamic_emergency_endpoints(read): Returns the dynamic emergency endpoints according to filtersdelete_dynamic_emergency_endpoints(write): Deletes the dynamic emergency endpoint based on the ID provided
Resource enum:
retrieve_enum(read): Get Enum
Resource external_connections:
create_external_connections(write): Creates a new External Connection based on the parameters sent in the request. The external_sip_connection and outbound voice profile id are required. Once created, you can assign phone numbers to your application using the/phone_numbersendpoint.retrieve_external_connections(read): Return the details of an existing External Connection inside the 'data' attribute of the response.update_external_connections(write): Updates settings of an existing External Connection based on the parameters of the request.list_external_connections(read): This endpoint returns a list of your External Connections inside the 'data' attribute of the response. External Connections are used by Telnyx customers to seamless configure SIP trunking integrations with Telnyx Partners, through External Voice Integrations in Mission Control Portal.delete_external_connections(write): Permanently deletes an External Connection. Deletion may be prevented if the application is in use by phone numbers, is active, or if it is an Operator Connect connection. To remove an Operator Connect integration please contact Telnyx support.update_location_external_connections(write): Update a location's static emergency address
Resource external_connections.log_messages:
retrieve_external_connections_log_messages(read): Retrieve a log message for an external connection associated with your account.list_external_connections_log_messages(read): Retrieve a list of log messages for all external connections associated with your account.dismiss_external_connections_log_messages(write): Dismiss a log message for an external connection associated with your account.
Resource external_connections.civic_addresses:
retrieve_external_connections_civic_addresses(read): Return the details of an existing Civic Address with its Locations inside the 'data' attribute of the response.list_external_connections_civic_addresses(read): Returns the civic addresses and locations from Microsoft Teams.
Resource external_connections.phone_numbers:
retrieve_external_connections_phone_numbers(read): Return the details of a phone number associated with the given external connection.update_external_connections_phone_numbers(write): Asynchronously update settings of the phone number associated with the given external connection.list_external_connections_phone_numbers(read): Returns a list of all active phone numbers associated with the given external connection.
Resource external_connections.releases:
retrieve_external_connections_releases(read): Return the details of a Release request and its phone numbers.list_external_connections_releases(read): Returns a list of your Releases for the given external connection. These are automatically created when you change theconnection_idof a phone number that is currently on Microsoft Teams.
Resource external_connections.uploads:
create_external_connections_uploads(write): Creates a new Upload request to Microsoft teams with the included phone numbers. Only one of civic_address_id or location_id must be provided, not both. The maximum allowed phone numbers for the numbers_ids array is 1000.retrieve_external_connections_uploads(read): Return the details of an Upload request and its phone numbers.list_external_connections_uploads(read): Returns a list of your Upload requests for the given external connection.pending_count_external_connections_uploads(read): Returns the count of all pending upload requests for the given external connection.refresh_status_external_connections_uploads(write): Forces a recheck of the status of all pending Upload requests for the given external connection in the background.retry_external_connections_uploads(write): If there were any errors during the upload process, this endpoint will retry the upload request. In some cases this will reattempt the existing upload request, in other cases it may create a new upload request. Please check the ticket_id in the response to determine if a new upload request was created.
Resource fax_applications:
create_fax_applications(write): Creates a new Fax Application based on the parameters sent in the request. The application name and webhook URL are required. Once created, you can assign phone numbers to your application using the/phone_numbersendpoint.retrieve_fax_applications(read): Return the details of an existing Fax Application inside the 'data' attribute of the response.update_fax_applications(write): Updates settings of an existing Fax Application based on the parameters of the request.list_fax_applications(read): This endpoint returns a list of your Fax Applications inside the 'data' attribute of the response. You can adjust which applications are listed by using filters. Fax Applications are used to configure how you send and receive faxes using the Programmable Fax API with Telnyx.delete_fax_applications(write): Permanently deletes a Fax Application. Deletion may be prevented if the application is in use by phone numbers.
Resource faxes:
create_faxes(write): Send a fax. Files have size limits and page count limit validations. If a file is bigger than 50MB or has more than 350 pages it will fail withfile_size_limit_exceededandpage_count_limit_exceededrespectively.Expected Webhooks:
fax.queuedfax.media.processedfax.sending.startedfax.deliveredfax.failed
retrieve_faxes(read): View a faxlist_faxes(read): View a list of faxesdelete_faxes(write): Delete a fax
Resource faxes.actions:
cancel_faxes_actions(write): Cancel the outbound fax that is in one of the following states:queued,media.processed,originatedorsendingrefresh_faxes_actions(write): Refreshes the inbound fax's media_url when it has expired
Resource fqdn_connections:
create_fqdn_connections(write): Creates a FQDN connection.retrieve_fqdn_connections(read): Retrieves the details of an existing FQDN connection.update_fqdn_connections(write): Updates settings of an existing FQDN connection.list_fqdn_connections(read): Returns a list of your FQDN connections.delete_fqdn_connections(write): Deletes an FQDN connection.
Resource fqdns:
create_fqdns(write): Create a new FQDN object.retrieve_fqdns(read): Return the d
