NAME
Twilio::Rest::Api::V2010::Account::Address - The Address resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $address = $client->addresses->create($customer_name, $street, $city, $region, $postal_code, $iso_country, \%options);
for my $address ($client->addresses->read({}, 20)) {
...
}
my $address = $client->addresses($sid)->fetch;
$client->addresses($sid)->update(\%options);
$client->addresses($sid)->delete;
DESCRIPTION
An Address instance resource represents your or your customer's physical location within a country. Around the world, some local authorities require the name and address of the user to be on file with Twilio to purchase and own a phone number.
This file holds AddressList, AddressPage, AddressContext and AddressInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
AddressList
Returned by $client->addresses. See also Twilio::ListResource.
create
my $address = $client->addresses->create($customer_name, $street, $city, $region, $postal_code, $iso_country, \%options);
Returns a AddressInstance.
The required values are:
$customer_name-
The name to associate with the new address.
$street-
The number and street address of the new address.
$city-
The city of the new address.
$region-
The state or region of the new address.
$postal_code-
The postal code of the new address.
$iso_country-
The ISO country code of the new address.
The options are:
auto_correct_address-
Whether we should automatically correct the address. Can be:
trueorfalseand the default istrue. If empty ortrue, we will correct the address you provide if necessary. Iffalse, we won't alter the address you provide. emergency_enabled-
Whether to enable emergency calling on the new address. Can be:
trueorfalse. friendly_name-
A descriptive string that you create to describe the new address. It can be up to 64 characters long for Regulatory Compliance addresses and 32 characters long for Emergency addresses.
street_secondary-
The additional number and street address of the address.
read
my @records = $client->addresses->read(\%options, $limit, $page_size);
Returns the records as a list, fetching as many pages as it needs.
The options are:
customer_name-
The
customer_nameof the Address resources to read. emergency_enabled-
Whether the address can be associated to a number for emergency calling.
friendly_name-
The string that identifies the Address resources to read.
iso_country-
The ISO country code of the Address resources to read.
stream
my $stream = $client->addresses->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->addresses->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->addresses->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->addresses->get_context($sid);
Returns a AddressContext, and makes no request.
AddressPage
A Twilio::Page of AddressInstance objects.
records_key
build_instance
Used by Twilio::Page.
AddressContext
Returned by $client->addresses($sid). It makes no request until one of these methods is called.
fetch
my $address = $client->addresses($sid)->fetch;
Returns a AddressInstance.
update
my $address = $client->addresses($sid)->update(\%options);
Returns a AddressInstance.
The options are:
auto_correct_address-
Whether we should automatically correct the address. Can be:
trueorfalseand the default istrue. If empty ortrue, we will correct the address you provide if necessary. Iffalse, we won't alter the address you provide. city-
The city of the address.
customer_name-
The name to associate with the address.
emergency_enabled-
Whether to enable emergency calling on the address. Can be:
trueorfalse. friendly_name-
A descriptive string that you create to describe the new address. It can be up to 64 characters long for Regulatory Compliance addresses and 32 characters long for Emergency addresses.
postal_code-
The postal code of the address.
region-
The state or region of the address.
street-
The number and street address of the address.
street_secondary-
The additional number and street address of the address.
delete
$client->addresses($sid)->delete;
Returns true.
dependent_phone_numbers
my $list = $object->dependent_phone_numbers;
See Twilio::Rest::Api::V2010::Account::Address::DependentPhoneNumber.
AddressInstance
See also Twilio::InstanceResource.
It has fetch, update, delete and dependent_phone_numbers, which work as they do on the context.
Its fields are:
- account_sid
-
The SID of the Account that is responsible for the Address resource.
- city
-
The city in which the address is located.
- customer_name
-
The name associated with the address.This property has a maximum length of 16 4-byte characters, or 21 3-byte characters.
- date_created
-
The date and time in GMT that the resource was created specified in RFC 2822 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- date_updated
-
The date and time in GMT that the resource was last updated specified in RFC 2822 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- emergency_enabled
-
Whether emergency calling has been enabled on this number.
- friendly_name
-
The string that you assigned to describe the resource.
- iso_country
-
The ISO country code of the address.
- postal_code
-
The postal code of the address.
- region
-
The state or region of the address.
- sid
-
The unique string that that we created to identify the Address resource.
- street
-
The number and street address of the address.
- street_secondary
-
The additional number and street address of the address.
- uri
-
The URI of the resource, relative to
https://api.twilio.com. - validated
-
Whether the address has been validated to comply with local regulation. In countries that require valid addresses, an invalid address will not be accepted.
trueindicates the Address has been validated.falseindicate the country doesn't require validation or the Address is not valid. - verified
-
Whether the address has been verified to comply with regulation. In countries that require valid addresses, an invalid address will not be accepted.
trueindicates the Address has been verified.falseindicate the country doesn't require verified or the Address is not valid.
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.