Check if a single phone number can be ported to Twilio
Check if a single phone number can be ported to Twilio
Query parameters
-
Account Sid to which the number will be ported. This can be used to determine if a sub account already has the number in its inventory or a different sub account. If this is not provided, the authenticated account will be assumed to be the target account.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^AC[0-9a-fA-F]{32}$
. -
Address Sid of customer to which the number will be ported.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^AD[0-9a-fA-F]{32}$
.
GET
/v1/Porting/Portability/PhoneNumber/{PhoneNumber}
curl \
--request GET 'https://numbers.twilio.com/v1/Porting/Portability/PhoneNumber/{PhoneNumber}' \
--user "username:password"
Response examples (200)
{
"url": "https://numbers.twilio.com/v1/Porting/Portability/PhoneNumber/+18001234567",
"country": "US",
"portable": false,
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa01",
"number_type": "TOLL-FREE",
"phone_number": "+18001234567",
"not_portable_reason": "MANUAL_PORTING_AVAILABLE",
"not_portable_reason_code": 22133,
"pin_and_account_number_required": false
}