With Twilio Proxy, you associate phone numbers (this resource) and short codes directly with a Proxy Service. All added numbers go into the Phone Number Pool associated with a given Proxy Service.
A Twilio number cannot be associated with more than one Proxy Service, but it can be associated with a Messaging Service, for example, to complete US A2P 10DLC registration (see below for important details about how to do this).
For more information on managing the phone numbers in your Proxy Phone Number Pool, refer to our Phone Number Management guide.
"Reserved" numbers in Proxy
In a Proxy service, phone numbers can be marked as Reserved. Reserved numbers will not be included in the set of numbers Proxy considers when choosing a number for a participant, but they can be manually assigned as Proxy Numbers for participants (e.g., in a lead tracking use-case).
Proxy Number Pool Size Limit
Phone Number Pools are limited to 5000 reserved phone numbers and 500 unreserved phone numbers per Proxy Service. Numbers can be distributed across multiple Proxy Services if you need more of numbers.
Adding Proxy Phone Numbers to Messaging Services
It is possible to associate Twilio Proxy numbers with a Messaging Service, although there are some limitations to be aware of. This capability is especially important for customers who use US long code numbers to send messages to US recipients because adding numbers to a Messaging Service is required in order to complete A2P 10DLC registration.
Currently, a number that is already associated with a Messaging Service cannot be added to a Proxy Service via the Proxy Console or API.
However, Twilio numbers that are already associated with a Proxy Service can be associated with a Messaging Service. Before doing this, you must ensure that your Messaging Service is configured correctly. Your Messaging Service must have its Incoming Message handling behavior set to "Defer to sender's webhook" to ensure that your numbers continue to use Proxy after they are added to the Service.
Step-by-step instructions to associate Proxy numbers with a Messaging Service:
Set up your Messaging Service, but do not add any phone numbers to it yet. Ensure that the Incoming Message handling is set to "Defer to sender's webhook." This setting can be found in the "Integration" settings for the Messaging Service in the Twilio Console.
Ensure that all numbers you plan to add to the Messaging Service are already associated with a Proxy Service.
Add your Proxy numbers to the Messaging Service, either using the Twilio Console or the Messaging Service API PhoneNumber endpoint.
Whether the phone number should be reserved and not be assigned to a participant using proxy pool logic. See Reserved Phone Numbers for more information.
The phone number in E.164 format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234.
Whether the new phone number should be reserved and not be assigned to a participant using proxy pool logic. See Reserved Phone Numbers for more information.
Add a Phone Number
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl
_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
Note: You should pass a PhoneNumberor a Sid (identifying a phone number on your account). Only one of them is required. Passing both will return an error.
Fetch a PhoneNumber resource
GET https://proxy.twilio.com/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}
Whether the phone number should be reserved and not be assigned to a participant using proxy pool logic. See Reserved Phone Numbers for more information.
Update a PhoneNumber
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl
_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure