Skip to main content
This quickstart guide will help you install the Telnyx CLI, configure authentication, and run your first commands.

Prerequisites

Step 1: Install the CLI

Ensure Go’s bin directory is in your PATH:
Verify the installation:

Step 2: Configure Authentication

Set your API key as an environment variable. You can get your API key from the Telnyx Portal.
Add this line to your shell profile (~/.bashrc, ~/.zshrc, etc.) to persist it across sessions.

Verify Authentication

Test that your credentials are working:
You should see your account balance information.

Step 3: Run Your First Commands

Check Your Balance

List Your Phone Numbers

Search for Available Numbers

Send a Test Message

You’ll need a messaging-enabled phone number and a configured messaging profile.

Step 4: Explore Commands

Get Help

Common Commands

Output Formats

The CLI supports multiple output formats:

Debug Mode

To see full HTTP request/response details:

Next Steps

Authentication

Learn about authentication options

General Usage

Output formats, scripting, and CI/CD integration