Skip to main content
The Telnyx CLI is the official command-line interface for managing Telnyx resources directly from your terminal. Send messages, manage phone numbers, control calls, and more — all without leaving the command line.

When to Use the CLI vs the API

Use CaseCLIAPI
Quick manual tasks✅ Best choiceOverkill
Scripting & automation✅ Great for bash/shell✅ Better for complex logic
CI/CD pipelines✅ Simple integrations✅ Full control
Production applications❌ Not recommended✅ Use SDKs or direct API
Exploring the API✅ Fast iterationSlower feedback loop
The CLI is ideal for operators, developers exploring the API, and simple automation. For production applications, use the Telnyx SDKs or call the REST API directly.

Features

Full API Coverage

Access all Telnyx APIs — messaging, voice, numbers, 10DLC, AI, verification, storage, and more

Multiple Output Formats

JSON, YAML, pretty-print, and raw output for scripting and human readability

Auto-generated from OpenAPI

Always in sync with the latest Telnyx API endpoints

Debug Mode

Inspect HTTP requests and responses for troubleshooting

Quick Example

# Set your API key
export TELNYX_API_KEY=KEY_xxxxxxxxxxxxx

# List your phone numbers
telnyx phone-numbers list

# Search for available phone numbers
telnyx available-phone-numbers list --filter.country-code US

# Send an SMS
telnyx messages send --from +15551234567 --to +15559876543 --text "Hello from CLI!"

# Check your balance
telnyx balance retrieve

Installation

Install via Go:
go install github.com/team-telnyx/telnyx-cli/cmd/telnyx@latest
Requires Go 1.22+. After installation, ensure $GOPATH/bin is in your PATH.

Installation Guide

Detailed installation instructions and troubleshooting

Documentation

Quickstart

Get up and running in 5 minutes

Authentication

Configure your API key

General Usage

Output formats, filtering, and scripting

Command Reference

Full list of all CLI commands

Resources

GitHub Repository

View source, report issues, and contribute

Releases & Changelog

Release notes and version history

API Reference

Full API documentation (CLI wraps these endpoints)