telnyx <command> --help for detailed options.
The CLI wraps the Telnyx REST API. For full request/response schemas, see the corresponding API reference for each resource.
Authentication
Report incorrect code
Copy
Ask AI
telnyx auth setup # Interactive API key setup
telnyx auth setup --profile prod # Setup named profile
telnyx auth status # Check current auth status
Profiles
Report incorrect code
Copy
Ask AI
telnyx profile list # List all profiles
telnyx profile set-default <name> # Set default profile
telnyx profile delete <name> # Delete a profile
Phone Numbers
See Phone Numbers API for full response schemas.
Search & Purchase
Report incorrect code
Copy
Ask AI
# Search available numbers
telnyx number search --country US
telnyx number search --country US --contains 555
telnyx number search --country US --type toll_free
telnyx number search --country CA --locality Toronto --limit 20
# Purchase numbers
telnyx number order +15551234567
telnyx number order +15551234567 +15559876543 --messaging-profile-id <id>
telnyx number search --country US --limit 2 --json):
Report incorrect code
Copy
Ask AI
[
{
"phone_number": "+12025551234",
"region_information": [{"region_type": "state", "region_name": "DC"}],
"cost_information": {"upfront_cost": "1.00", "monthly_cost": "1.00"},
"features": ["sms", "mms", "voice", "fax"]
},
{
"phone_number": "+12025555678",
"region_information": [{"region_type": "state", "region_name": "DC"}],
"cost_information": {"upfront_cost": "1.00", "monthly_cost": "1.00"},
"features": ["sms", "mms", "voice"]
}
]
Manage Numbers
Report incorrect code
Copy
Ask AI
# List your numbers
telnyx number list
telnyx number list --status active
telnyx number list --tag production
# Get number details
telnyx number get +15551234567
# Update number settings
telnyx number update +15551234567 --connection-id <id>
telnyx number update +15551234567 --messaging-profile-id <id>
telnyx number update +15551234567 --tags production,us-west
# Release a number
telnyx number delete +15551234567 --force
telnyx number delete +15551234567 --dry-run
Messaging
See Messaging API for full payload options including webhooks and delivery reports.
Send Messages
Report incorrect code
Copy
Ask AI
# Send SMS
telnyx message send --from +15551234567 --to +15559876543 --text "Hello!"
telnyx message send -f +15551234567 -t +15559876543 --text "Hello!"
# Send MMS
telnyx message send --from +15551234567 --to +15559876543 \
--text "Check this out" \
--media https://example.com/image.jpg
telnyx message send ... --json):
Report incorrect code
Copy
Ask AI
{
"id": "4010101e-b673-4a0b-b677-3c82fc7bfee2",
"record_type": "message",
"direction": "outbound",
"from": {"phone_number": "+15551234567"},
"to": [{"phone_number": "+15559876543", "status": "queued"}],
"text": "Hello!",
"messaging_profile_id": "4001170e-b673-4a0b-aa77-3c82ea7bf442"
}
List & Retrieve
Report incorrect code
Copy
Ask AI
telnyx message list
telnyx message list --direction outbound --limit 50
telnyx message list --from +15551234567
telnyx message get <message-id>
Messaging Profiles
Report incorrect code
Copy
Ask AI
telnyx messaging-profile list
telnyx messaging-profile get <id>
telnyx messaging-profile create --name "Production" --webhook-url https://...
telnyx messaging-profile update <id> --webhook-url https://...
telnyx messaging-profile delete <id> --force
Voice
See Call Control API for advanced call flow options.
Make Calls
Report incorrect code
Copy
Ask AI
# Dial outbound call
telnyx call dial --from +15551234567 --to +15559876543 --connection-id <id>
telnyx call dial -f +15551234567 -t +15559876543 --connection-id <id>
# With answering machine detection
telnyx call dial --from +15551234567 --to +15559876543 \
--connection-id <id> \
--answering-machine-detection detect
Call Control
Report incorrect code
Copy
Ask AI
telnyx call list
telnyx call list --direction outgoing --status active
telnyx call hangup <call-control-id>
telnyx call speak <call-control-id> "Hello, how can I help you?"
telnyx call transfer <call-control-id> +15559876543
telnyx call playback <call-control-id> --audio-url https://...
Voice Profiles
Report incorrect code
Copy
Ask AI
telnyx voice-profile list
telnyx voice-profile get <id>
telnyx voice-profile create --name "Production" --concurrent-call-limit 100
telnyx voice-profile delete <id> --force
Connections
Report incorrect code
Copy
Ask AI
telnyx connection list
telnyx connection list --type credential
telnyx connection get <id> --type credential
telnyx connection create --name "My Voice App" --type credential --webhook-url https://...
telnyx connection delete <id> --type credential --force
10DLC (US A2P Messaging)
For a conceptual overview of 10DLC registration, see Understanding 10DLC. For a step-by-step walkthrough, see How to Register for 10DLC.
Interactive Setup
Report incorrect code
Copy
Ask AI
telnyx 10dlc wizard # Guided setup wizard
Brands
Report incorrect code
Copy
Ask AI
telnyx 10dlc brand list
telnyx 10dlc brand get <brand-id>
telnyx 10dlc brand create \
--entity-type PRIVATE_PROFIT \
--display-name "My Company" \
--company-name "My Company Inc" \
--ein 12-3456789 \
--phone +15551234567 \
--street "123 Main St" \
--city "San Francisco" \
--state CA \
--postal-code 94102 \
--country US \
--vertical TECHNOLOGY \
--website https://example.com
# Sole proprietor brand
telnyx 10dlc brand create --sole-prop \
--display-name "My Business" \
--phone +15551234567 \
--email [email protected]
# Verify brand with OTP
telnyx 10dlc brand verify <brand-id> --pin <OTP>
Campaigns
Report incorrect code
Copy
Ask AI
telnyx 10dlc campaign list
telnyx 10dlc campaign get <campaign-id>
telnyx 10dlc campaign create \
--brand-id <id> \
--usecase MIXED \
--description "Customer notifications" \
--sample-message-1 "Your order has shipped" \
--sample-message-2 "Your appointment is tomorrow"
Number Assignment
Report incorrect code
Copy
Ask AI
# Assign number to campaign
telnyx 10dlc assign +15551234567 <campaign-id>
# Check assignment status
telnyx 10dlc assignment status +15551234567
Reference Data
Report incorrect code
Copy
Ask AI
telnyx 10dlc usecases # List available use cases
telnyx 10dlc verticals # List business verticals
Verify (2FA)
Profiles
Report incorrect code
Copy
Ask AI
telnyx verify profile list
telnyx verify profile get <id>
telnyx verify profile create --name "my-app" --default-verification-timeout-secs 300
telnyx verify profile delete <id> --force
Templates
Report incorrect code
Copy
Ask AI
telnyx verify template list
telnyx verify template create --text "Your {{app_name}} code is {{code}}. Do not share."
telnyx verify template get <id>
Send & Verify
Report incorrect code
Copy
Ask AI
# Send verification code
telnyx verify send --phone +15551234567 --profile-id <id>
telnyx verify send --phone +15551234567 --profile-id <id> --type call
# Check submitted code
telnyx verify check --phone +15551234567 --code 123456 --profile-id <id>
Fax
Report incorrect code
Copy
Ask AI
telnyx fax send \
--from +15551234567 \
--to +15559876543 \
--media-url https://example.com/document.pdf \
--connection-id <id>
telnyx fax list
telnyx fax list --direction outbound
telnyx fax get <fax-id>
telnyx fax delete <fax-id> --force
Number Lookup
Report incorrect code
Copy
Ask AI
telnyx lookup +15551234567
telnyx lookup +15551234567 --type carrier
telnyx lookup +15551234567 --type caller-name
Billing
Report incorrect code
Copy
Ask AI
telnyx billing balance # Check account balance
telnyx billing group list # List billing groups
telnyx billing group get <id> # Get billing group details
AI
Report incorrect code
Copy
Ask AI
# Chat with AI models
telnyx ai chat "What is the capital of France?"
telnyx ai chat "Summarize this: ..." --model llama3
# Generate embeddings
telnyx ai embed "Your text here"
Storage (S3-Compatible)
Buckets
Report incorrect code
Copy
Ask AI
telnyx storage bucket list
telnyx storage bucket create my-bucket
telnyx storage bucket delete my-bucket --force
Objects
Report incorrect code
Copy
Ask AI
# Upload
telnyx storage object put my-bucket/path/file.txt --file ./local-file.txt
telnyx storage object put my-bucket/image.jpg --file ./photo.jpg
# Download
telnyx storage object get my-bucket/path/file.txt --output ./downloaded.txt
# List
telnyx storage object list my-bucket
telnyx storage object list my-bucket --prefix "images/"
# Delete
telnyx storage object delete my-bucket/path/file.txt --force
Video
Rooms
Report incorrect code
Copy
Ask AI
telnyx video room list
telnyx video room create --name "Team Meeting" --max-participants 10
telnyx video room get <room-id>
telnyx video room delete <room-id> --force
Sessions & Recordings
Report incorrect code
Copy
Ask AI
telnyx video session list --room-id <id>
telnyx video recording list
telnyx video recording get <recording-id>
telnyx video recording delete <recording-id> --force
E911
Addresses
Report incorrect code
Copy
Ask AI
telnyx e911 address list
telnyx e911 address create \
--street "123 Main St" \
--city "San Francisco" \
--state CA \
--postal-code 94102 \
--country US
telnyx e911 address delete <id> --force
Porting
Report incorrect code
Copy
Ask AI
telnyx porting order list
telnyx porting order get <order-id>
telnyx porting order create --numbers +15551234567,+15559876543
Usage Reports
Report incorrect code
Copy
Ask AI
telnyx usage list
telnyx usage list --product messaging --start-date 2024-01-01 --end-date 2024-01-31
telnyx usage get <report-id>
Getting Help
Report incorrect code
Copy
Ask AI
telnyx --help # General help
telnyx <command> --help # Command-specific help
telnyx number --help # Topic help
telnyx number search --help # Subcommand help