NAME
Twilio::Rest::Numbers::V1::PortingPortability - The PortingPortability resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $porting_portability = $client->numbers->v1->porting_portabilities($phone_number)->fetch;
DESCRIPTION
This file holds PortingPortabilityList, PortingPortabilityContext and PortingPortabilityInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
PortingPortabilityList
Returned by $client->numbers->v1->porting_portabilities. See also Twilio::ListResource.
get_context
my $context = $client->numbers->v1->porting_portabilities->get_context($phone_number);
Returns a PortingPortabilityContext, and makes no request.
PortingPortabilityContext
Returned by $client->numbers->v1->porting_portabilities($phone_number). It makes no request until one of these methods is called.
fetch
my $porting_portability = $client->numbers->v1->porting_portabilities($phone_number)->fetch(\%options);
Check if a single phone number can be ported to Twilio. Returns a PortingPortabilityInstance.
The options are:
address_sid-
Address Sid of customer to which the number will be ported.
target_account_sid-
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.
PortingPortabilityInstance
See also Twilio::InstanceResource.
It has fetch, which work as they do on the context.
Its fields are:
- account_sid
-
Account Sid that the phone number belongs to in Twilio. This is only returned for phone numbers that already exist in Twilio’s inventory and belong to your account or sub account.
- country
-
Country the phone number belongs to.
- not_portable_reason
-
Reason why the phone number cannot be ported into Twilio,
nullotherwise. - not_portable_reason_code
-
The Portability Reason Code for the phone number if it cannot be ported into Twilio,
nullotherwise. - number_type
-
One of
LOCAL,UNKNOWN,MOBILEorTOLL-FREE. - phone_number
-
The phone number which portability is to be checked. Phone numbers are in E.164 format (e.g. +16175551212).
- pin_and_account_number_required
-
Indicates if the port in process will require a personal identification number (PIN) and an account number for this phone number. If this is true you will be required to submit both a PIN and account number from the losing carrier for this number when opening a port in request. These fields will be required in order to complete the port in process to Twilio.
- portable
-
Boolean flag indicates if the phone number can be ported into Twilio through the Porting API or not.
- url
-
This is the url of the request that you're trying to reach out to locate the resource.
CONSTRUCTORS
new
Objects here come from the methods above, so there is no need to call new directly.
LICENSE
Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.