SDKs overview

Telnyx provides Software Development Kits (SDKs) to facilitate interaction with its communication APIs. These SDKs abstract the underlying HTTP requests and responses, allowing developers to integrate voice, SMS, and other communication functionalities into their applications using familiar programming language constructs. The official SDKs are designed to fully support the Telnyx API v2, covering core products such as programmable voice, SMS, and SIP trunking.

The SDKs handle common development tasks, including authentication, request serialization, and response deserialization. This enables developers to focus on application logic rather than the intricacies of RESTful API communication. Telnyx maintains official SDKs for Python, Node.js, Ruby, PHP, Java, Go, and C#, ensuring broad language support for their developer base.

Official SDKs by language

Telnyx offers official SDKs that provide idiomatic access to its API endpoints. These libraries are maintained by Telnyx to ensure compatibility and feature parity with the latest API versions. Each SDK is tailored to the conventions of its respective language, aiming for a streamlined developer experience.

The table below summarizes the official SDKs, their package names, typical installation commands, and general maturity level:

Language Package Name Install Command Example Maturity
Python telnyx pip install telnyx Stable
Node.js telnyx npm install telnyx Stable
Ruby telnyx gem install telnyx Stable
PHP telnyx/telnyx-php composer require telnyx/telnyx-php Stable
Java com.telnyx Add to pom.xml or build.gradle Stable
Go github.com/telnyx/telnyx-go go get github.com/telnyx/telnyx-go Stable
C# Telnyx dotnet add package Telnyx Stable

Installation

Installing Telnyx SDKs typically involves using the standard package manager for the respective programming language. Each SDK is distributed through its language's primary package registry, simplifying dependency management and updates. Before installation, developers should ensure they have the correct language runtime and package manager set up.

Python

The Python SDK can be installed using pip, the Python package installer. It requires Python 3.6 or newer.

pip install telnyx

Node.js

For Node.js projects, the SDK is available via npm (Node Package Manager) or yarn. It requires Node.js 10 or newer.

npm install telnyx
# or
yarn add telnyx

Ruby

The Ruby SDK is distributed as a Gem and can be installed using the gem command.

gem install telnyx

PHP

The PHP SDK is managed with Composer, the dependency manager for PHP. It requires PHP 7.1 or newer.

composer require telnyx/telnyx-php

Java

The Java SDK can be included in Maven or Gradle projects by adding the appropriate dependency to the project's build file.

Maven (pom.xml)

<dependency>
    <groupId>com.telnyx</groupId>
    <artifactId>telnyx-java</artifactId>
    <version>2.x.x</version> <!-- Replace with the latest version -->
</dependency>

Gradle (build.gradle)

implementation 'com.telnyx:telnyx-java:2.x.x' // Replace with the latest version

Go

The Go SDK can be added to a Go module using the go get command.

go get github.com/telnyx/telnyx-go

C#

The C# SDK is available as a NuGet package and can be installed using the .NET CLI or NuGet Package Manager.

dotnet add package Telnyx

For detailed installation instructions and system requirements, consult the Telnyx developer documentation for each specific language SDK.

Quickstart example

This quickstart example demonstrates sending an SMS message using the Telnyx Node.js SDK. This example assumes you have your Telnyx API Key configured as an environment variable named TELNYX_API_KEY. You will also need a Telnyx Messaging Profile ID and a Telnyx-provisioned phone number.

First, ensure the Node.js SDK is installed:

npm install telnyx

Then, create a JavaScript file (e.g., send-sms.js) with the following content:

const telnyx = require('telnyx')(process.env.TELNYX_API_KEY);

async function sendSms() {
  try {
    await telnyx.messages.create({
      from: '+15551234567', // Your Telnyx provisioned phone number
      to: '+15559876543',   // The recipient's phone number
      text: 'Hello from Telnyx Node.js SDK!',
      messaging_profile_id: '12345678-abcd-abcd-abcd-1234567890ab' // Your Telnyx Messaging Profile ID
    });
    console.log('SMS sent successfully!');
  } catch (error) {
    console.error('Error sending SMS:', error.message);
  }
}

sendSms();

Replace +15551234567 with your Telnyx phone number, +15559876543 with the recipient's number, and 12345678-abcd-abcd-abcd-1234567890ab with your actual Telnyx Messaging Profile ID. Your API key should be stored securely as an environment variable, not hardcoded. For instance, you could set it in your terminal:

export TELNYX_API_KEY="YOUR_TELNYX_API_KEY"
node send-sms.js

This example demonstrates basic message creation. More complex scenarios, such as handling delivery receipts or media messages, are supported through additional parameters and methods within the SDK. For further examples and API details, refer to the Telnyx Messages API documentation.

Community libraries

While Telnyx provides a robust set of official SDKs, the broader developer community may contribute additional libraries, wrappers, or tools that extend functionality or integrate Telnyx services into specific frameworks or platforms. These community-driven projects can offer alternative approaches or specialized features not available in the official SDKs.

Community libraries are typically hosted on platforms like GitHub and may vary in their level of maintenance, documentation, and API version compatibility. Developers considering community libraries should evaluate their active development, issue resolution, and community support before integrating them into production environments. Resources like open-source software repositories and developer forums are good places to discover and review these contributions.

As of May 2026, Telnyx primarily emphasizes its official SDKs. While there are no prominent community-supported SDKs widely adopted outside of the official offerings, developers can search GitHub for "Telnyx" to find community-driven projects that might include utility libraries, example applications, or integrations with other services. Always verify the source and security practices of any third-party library before use.

For specific Telnyx API features or use cases not fully covered by the official SDKs, developers may also opt to interact directly with the Telnyx REST API using standard HTTP client libraries available in their preferred programming language.