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 Telnyx APIs for messaging, voice, numbers, 10DLC, verification, storage, and more

Multiple Authentication

Support for API keys, environment variables, and named profiles

Shell Autocomplete

Tab completion for commands, flags, and resource IDs

JSON & Table Output

Flexible output formats for scripting and human readability

Quick Example

# Configure authentication
telnyx auth setup

# Search for available phone numbers
telnyx number search --country US --locality "San Francisco"

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

# Check your balance
telnyx billing balance

Installation

Install via npm:
npm install -g @telnyx/api-cli

Installation Guide

Detailed installation instructions and troubleshooting

Documentation

Resources