Buy a Phone Number
Phone numbers are essential for most Telnyx services including Voice API, Messaging, and Fax. This guide shows you how to purchase numbers through both the Mission Control Portal and programmatically via API.
Via Mission Control Portal
- Navigate to Real-Time Communication > Numbers > Buy Numbers in the left sidebar.
- Select your search criteria:
- Country (e.g., United States).
- Features (SMS, Voice, Fax, etc).
- Number type (Local, Toll-Free, etc.).
- State/Region.
- City/Area Code.
- Click Search.
- Choose a number from the results.
- Click Add to Cart next to your chosen number.
- Confirm the purchase by clicking Place Order.
Via API
You can also purchase numbers programmatically:
# Search for available numbers
curl -X GET \
--header "Authorization: Bearer your_api_key" \
"https://api.telnyx.com/v2/available_phone_numbers?filter[country_code]=US&filter[locality]=Chicago"
# Purchase a specific number
curl -X POST \
--header "Content-Type: application/json" \
--header "Authorization: Bearer your_api_key" \
--data '{
"phone_numbers": [{"phone_number": "+13125551234"}]
}' \
"https://api.telnyx.com/v2/number_orders"
Next Steps
After purchasing your phone number, you'll typically need to:
- For Voice applications: Assign it to a Voice API Application or SIP Connection.
- For Messaging: Configure it with a Messaging Profile.
- For Fax: Set up Fax Application settings.