REST API: Addresses

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. Address requirements are exposed as a property on the AvailablePhoneNumber resource.

Addresses contain the name of your company or your customer’s company in addition to location information and an optional friendly name. Each Address created on an account or subaccount can be used for any phone numbers purchased on that account. After creating an address, it can be used to satisfy the requirements for multiple phone numbers and phone numbers with address requirements can be purchased using the IncomingPhoneNumber resource.

In some countries, to comply with local regulation, addresses are validated to ensure the integrity and accuracy of the data provided. In those countries, if the address you provide does not pass validation, it is not accepted as an Address and error code 21628 is returned. If the address submitted is not an exact match but is similar to a valid address, we’ll provide it as a suggested address in error code 21629. If the suggested address is indeed the address of your company or your customer’s company then use the suggested format to create a valid Address.

The Address list resource represents all of the Addresses that you have created on your account within Twilio. You can POST to Addresses to create a new address or modify an existing address.

Address Instance Resource

Resource URI

/2010-04-01/Accounts/{AccountSid}/Addresses/{AddressSid}

Resource Properties

Property Description
Sid A 34 character string that uniquely identifies this address.
AccountSid The unique id of the Account responsible for this address.
FriendlyName A human-readable description of the address. Maximum 64 characters.
CustomerName Your name or business name, or that of your customer.
Street The number and street address where you or your customer is located.
City The city in which you or your customer is located.
Region The state or region in which you or your customer is located.
PostalCode The postal code in which you or your customer is located.
IsoCountry The ISO country code of your or your customer's address.
Uri The URI for this resource, relative to https://api.twilio.com.
EmergencyEnabled This is a value that indicates if emergency calling has been enabled on this number. Possible values are true or false.
Validated In some countries, addresses are validated to comply with local regulation. In those countries, if the address you provide does not pass validation, it will not be accepted as an Address. This value will be true if the Address has been validated, or false for countries that don't require validation or if the Address is non-compliant.

HTTP GET

Example
Loading Code Samples...
Language
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
  • XML
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AD2a0747eba6abf96b7e3c3ff0b4530f6e.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers are your accountSid and authToken from
// https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.addresses('AD2a0747eba6abf96b7e3c3ff0b4530f6e')
  .fetch()
  .then((address) => console.log(address.customerName));
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AP2a0747eba6abf96b7e3c3ff0b4530f6e \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var app = twilio.GetAddress("AD2a0747eba6abf96b7e3c3ff0b4530f6e");

    Console.WriteLine(app.CustomerName);
  }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Services_Twilio($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$address = $client->account->addresses->get("AD2a0747eba6abf96b7e3c3ff0b4530f6e");
echo $address->customer_name;
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@address = @client.account.addresses.get("AP2a0747eba6abf96b7e3c3ff0b4530f6e")
puts @address.customer_name
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        TwilioClient.Init(accountSid, authToken);

        var address = AddressResource.Fetch("AD2a0747eba6abf96b7e3c3ff0b4530f6e");

        Console.WriteLine(address.CustomerName);
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$address = $client
    ->addresses("AD2a0747eba6abf96b7e3c3ff0b4530f6e")
    ->fetch();

echo $address->customerName;
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

address = client.addresses.get("AP2a0747eba6abf96b7e3c3ff0b4530f6e")
print(address.customer_name)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# Initialize Twilio Client
@client = Twilio::REST::Client.new(account_sid, auth_token)

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@address = @client.api.addresses('AP2a0747eba6abf96b7e3c3ff0b4530f6e').fetch

puts @address.customer_name
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.addresses("AD2a0747eba6abf96b7e3c3ff0b4530f6e").get(function(err, address) {
    console.log(address.customerName);
});
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Address;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Address address = client.getAccount().getAddress("AD2a0747eba6abf96b7e3c3ff0b4530f6e");
    System.out.println(address.getCustomerName());

  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

address = client.addresses("AP2a0747eba6abf96b7e3c3ff0b4530f6e") \
                .fetch()

print(address.customer_name)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.Address;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Address address = Address.fetcher("AD2a0747eba6abf96b7e3c3ff0b4530f6e").fetch();

    System.out.println(address.getCustomerName());
  }
}
{
    "sid": "AD2a0747eba6abf96b7e3c3ff0b4530f6e",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "friendly_name": "Billing - Customer 123",
    "customer_name": "Customer 123",
    "street": "1 Hasselhoff Lane",
    "city": "Berlin",
    "region": "Berlin",
    "postal_code": "10785",
    "iso_country": "DE",
}
<TwilioResponse>
	<Address>
		<Sid>AD2a0747eba6abf96b7e3c3ff0b4530f6e</Sid>
		<DateCreated>Mon, 16 Aug 2010 23:00:23 +0000</DateCreated>
		<DateUpdated>Mon, 16 Aug 2010 23:00:23 +0000</DateUpdated>
		<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
		<FriendlyName>Billing - Customer 123</FriendlyName>
		<CustomerName>Customer 123</CustomerName>
		<Street>1 Hasselhoff Lane</Street>
		<City>Berlin</City>
		<Region>Berlin</Region>
		<PostalCode>10785</PostalCode>
		<IsoCountry>DE</IsoCountry>
		<Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AD2a0747eba6abf96b7e3c3ff0b4530f6e</Uri>
	</Address>
</TwilioResponse>
Instance Get Example 1

HTTP POST

A POST request attempts to update an individual Address instance and returns the updated resource representation if successful. A successful returned response is identical to that of the HTTP GET.

Note that that all fields but IsoCountry can be updated using a POST request. To update the IsoCountry, a new Address must be created.

Optional Parameters

You may specify one or more of the following parameters to update this address's respective properties:

Parameter Description
Sid A 34 character string that uniquely identifies this address.
AccountSid The unique id of the Account responsible for this address.
FriendlyName A human-readable description of the address. Maximum 64 characters.
CustomerName Your name or business name, or that of your customer.
Street The number and street address where you or your customer is located.
City The city in which you or your customer is located.
Region The state or region in which you or your customer is located.
PostalCode The postal code in which you or your customer is located.
Example

Update the customer name and street to ‘Customer 456’ and ‘2 Hasselhoff Lane’.

Loading Code Samples...
Language
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
  • XML
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AD2a0747eba6abf96b7e3c3ff0b4530f6e.json \
-d "CustomerName=Customer 456" \
-d "Street=2 Hasselhoff Lane" \
-u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers are your accountSid and authToken from
// https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.addresses('AD2a0747eba6abf96b7e3c3ff0b4530f6e')
  .update({
    customerName: 'Customer 456',
    street: '2 Hasselhoff Lane',
  })
  .then((address) => console.log(address.customerName));
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AD2a0747eba6abf96b7e3c3ff0b4530f6e \
    -d "CustomerName=Customer 456" \
    -d "Street=2 Hasselhoff Lane" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var options = new AddressOptions();
    options.CustomerName = "Customer 456";
    options.Street = "2 Hasselhoff Lane";

    twilio.UpdateAddress("AD2a0747eba6abf96b7e3c3ff0b4530f6e", options);
  }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Services_Twilio($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$address = $client->account->addresses->get("AD2a0747eba6abf96b7e3c3ff0b4530f6e");
$address->update(array(
        "CustomerName" => "Customer 456",
        "Street" => "2 Hasselhoff Lane"
    ));
echo $address->customer_name;
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@address = @client.account.addresses.get("AD2a0747eba6abf96b7e3c3ff0b4530f6e")
@address.update(customer_name: "Customer 456",
  street: "2 Hasselhoff Lane")
puts @address.customer_name
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        TwilioClient.Init(accountSid, authToken);

        const string addressSid = "AD2a0747eba6abf96b7e3c3ff0b4530f6e";
        AddressResource.Update(addressSid,
                               customerName: "Customer 456",
                               street: "2 Hasselhoff Lane");
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$address = $client
    ->addresses("AD2a0747eba6abf96b7e3c3ff0b4530f6e")
    ->update(
        array(
            'customerName' => 'Customer 456',
            'street' => '2 Hasselhoff Lane'
        )
    );

echo $address->customerName;
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

address = client.addresses.update(
    "AD2a0747eba6abf96b7e3c3ff0b4530f6e",
    customer_name="Customer 456",
    street="2 Hasselhoff Lane")
print(address.customer_name)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# Initialize Twilio Client
@client = Twilio::REST::Client.new account_sid, auth_token

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@address = @client.api.addresses('AD2a0747eba6abf96b7e3c3ff0b4530f6e').fetch

@address.update(
  customer_name: 'Customer 456',
  street: '2 Hasselhoff Lane'
)

puts @address.customer_name
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.addresses("AD2a0747eba6abf96b7e3c3ff0b4530f6e").post({
    customerName: "Customer 456",
    street: "2 Hasselhoff Lane"
}, function(err, address) {
    console.log(address.customerName);
});
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Address;
import com.twilio.sdk.resource.list.AddressList;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Address address = client.getAccount().getAddress("AD2a0747eba6abf96b7e3c3ff0b4530f6e");
    // Build a filter for the AddressList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("CustomerName", "Customer 456"));
    params.add(new BasicNameValuePair("Street", "2 Hasselhoff Lane"));
    address.update(params);

  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

address = client.addresses("AD2a0747eba6abf96b7e3c3ff0b4530f6e") \
                .update(customer_name="Customer 456",
                        street="2 Hasselhoff Lane")

print(address.customer_name)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.Address;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Address address = Address.updater("AD2a0747eba6abf96b7e3c3ff0b4530f6e")
        .setCustomerName("Customer 456").setStreet("2 Hasselhoff Lane").update();

    System.out.println(address.getDateUpdated());
  }
}
{
    "sid": "AD2a0747eba6abf96b7e3c3ff0b4530f6e",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "friendly_name": "Billing - Customer 123",
    "customer_name": "Customer 456",
    "street": "2 Hasselhoff Lane",
    "city": "Berlin",
    "region": "Berlin",
    "postal_code": "10785",
    "iso_country": "DE",
}
<TwilioResponse>
	<Address>
		<Sid>AD2a0747eba6abf96b7e3c3ff0b4530f6e</Sid>
		<DateCreated>Mon, 16 Aug 2010 23:00:23 +0000</DateCreated>
		<DateUpdated>Mon, 16 Aug 2010 23:00:23 +0000</DateUpdated>
		<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
		<FriendlyName>Billing - Customer 123</FriendlyName>
		<CustomerName>Customer 456</CustomerName>
		<Street>2 Hasselhoff Lane</Street>
		<City>Berlin</City>
		<Region>Berlin</Region>
		<PostalCode>10785</PostalCode>
		<IsoCountry>DE</IsoCountry>
		<ApiVersion>2010-04-01</ApiVersion>
		<Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AD2a0747eba6abf96b7e3c3ff0b4530f6e</Uri>
	</Address>
</TwilioResponse>
Instance Post Example 1

HTTP PUT

Not supported.

HTTP DELETE

Deletes this address from your account.

If this address is required for any active IncomingPhoneNumbers, it cannot be deleted and you will receive Error 21625. However, if you have a second address that fulfills the AddressRequirement, the address will be successfully deleted. The DependentPhoneNumbers Instance Subresource will allow you to see which IncomingPhoneNumbers require a given address.

If the delete is successful, Twilio will return an HTTP 204 response with no body.

Addresses List Resource

Resource URI

/2010-04-01/Accounts/{AccountSid}/Addresses

HTTP GET

Returns a list of Address resource representations, each representing an address within your account. The list includes paging information.

List Filters

The following query string parameters allow you to limit the list returned. Note, parameters are case-sensitive:

Parameter Description
CustomerName Only return the Address resources with customer names that exactly match this name.
FriendlyName Only return the Address resources with friendly names that exactly match this name.
IsoCountry Only return the Address resources in this country.

Example 1

Show all addresses.

Loading Code Samples...
Language
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
  • XML
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers are your accountSid and authToken from
// https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.addresses.each((address) => console.log(address.friendlyName));
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var addresses = twilio.ListAddresses();

    foreach (var address in addresses.Addresses)
    {
      Console.WriteLine(address.FriendlyName);
    }
  }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Services_Twilio($sid, $token);

// Loop over the list of addresses and echo a property for each one
foreach ($client->account->addresses as $address) {
    echo $address->friendly_name;
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token


# Loop over addresses and print out a property for each one
@client.account.addresses.list.each do |address|
  puts address.friendly_name
end
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        TwilioClient.Init(accountSid, authToken);

        var addresses = AddressResource.Read();

        foreach (var address in addresses)
        {
            Console.WriteLine(address.FriendlyName);
        }
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Loop over the list of numbers and echo a property for each one
foreach ($client->addresses->read() as $address) {
    echo $address->friendlyName;
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

# A list of address objects with the properties described above
addresses = client.addresses.list()

for address in addresses:
    print(address.friendly_name)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# Initialize Twilio Client
@client = Twilio::REST::Client.new(account_sid, auth_token)

# Loop over addresses and print out a property for each one
@client.addresses.list.each do |address|
  puts address.friendly_name
end
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.addresses.list(function(err, data) {
    data.addresses.forEach(function(address) {
        console.log(address.friendlyName);
    });
});
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Address;
import com.twilio.sdk.resource.list.AddressList;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    AddressList addresses = client.getAccount().getAddresses();

    // Loop over addresses and print out a property for each one.
    for (Address address : addresses) {
      System.out.println(address.getFriendlyName());
    }

  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

# A list of address objects with the properties described above
addresses = client.addresses.list()

for address in addresses:
    print(address.friendly_name)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.api.v2010.account.Address;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    ResourceSet<Address> addresses = Address.reader().read();

    // Loop over addresses and print out a property for each one.
    for (Address address : addresses) {
      System.out.println(address.getFriendlyName());
    }
  }
}
{
    "page": 0,
    "page_size": 50,
    "uri":"/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses.json",
    "first_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses.json?Page=0&PageSize=50",
    "previous_page_uri": null,
    "next_page_uri": null,
    "addresses": [
        {
            "sid": "AD2a0747eba6abf96b7e3c3ff0b4530f6e",
            "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "friendly_name": "Billing - Customer 123",
            "customer_name": "Customer 123",
            "street": "1 Hasselhoff Lane",
            "city": "Berlin",
            "region": "Berlin",
            "postal_code": "10785",
            "iso_country": "DE",
        },
    ]
}
<TwilioResponse>
	<Addresses page="0" pagesize="50" uri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses" firstpageuri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses?Page=0&PageSize=50" previouspageuri="" nextpageuri="">
		<Address>
			<Sid>AD2a0747eba6abf96b7e3c3ff0b4530f6e</Sid>
			<DateCreated>Thu, 13 Nov 2008 07:56:24 +0000</DateCreated>
			<DateUpdated>Thu, 13 Nov 2008 08:45:58 +0000</DateUpdated>
			<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
			<FriendlyName>Billing - Customer 123</FriendlyName>
			<CustomerName>Customer 123</CustomerName>
			<Street>1 Hasselhoff Lane</Street>
			<City>Berlin</City>
			<Region>Berlin</Region>
			<PostalCode>10785</PostalCode>
			<IsoCountry>DE</IsoCountry>
			<ApiVersion>2010-04-01</ApiVersion>
			<Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AP3f94c94562ac88dccf16f8859a1a8b25</Uri>
		</Address>
	</Addresses>
</TwilioResponse>
List Get Example 1
Example 2

Show all addresses matching the Customer Name 'Customer 123'.

Loading Code Samples...
Language
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
  • XML
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses.json?CustomerName=Customer+123 \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers are your accountSid and authToken from
// https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.addresses
  .each({customerName: 'Customer 123'}, (address) => address.friendlyName);
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses?CustomerName=Customer+123 \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);
    var options = new AddressListRequest();
    options.CustomerName = "Customer 123";

    var addresses = twilio.ListAddresses(options);

    foreach (var address in addresses.Addresses)
    {
      Console.WriteLine(address.FriendlyName);
    }
  }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Services_Twilio($sid, $token);

// Loop over the list of addresses and echo a property for each one
foreach ($client->account->addresses->getIterator(0, 50, array(
	"CustomerName" => "Customer 123"
    )) as $address) {
    echo $address->friendly_name;
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token


# Loop over addresses and print out a property for each one
@client.account.addresses.list(customer_name: "Customer 123").each do |address|
  puts address.friendly_name
end
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        TwilioClient.Init(accountSid, authToken);

        var addresses = AddressResource.Read(customerName: "Customer 123");

        foreach (var address in addresses)
        {
            Console.WriteLine(address.FriendlyName);
        }
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$addresses = $client->addresses->read(
    array('customerName' => 'Customer 123')
);
// Loop over the list of numbers and echo a property for each one
foreach ($addresses as $address) {
    echo $address->friendlyName;
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

# A list of address objects with the properties described above
addresses = client.addresses.list(customer_name="Customer 123")

for address in addresses:
    print(address.friendly_name)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# Initialize Twilio Client
@client = Twilio::REST::Client.new(account_sid, auth_token)

# Loop over addresses and print out a property for each one
@client.addresses.list(customer_name: 'Customer 123')
       .each do |address|
         puts address.friendly_name
       end
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.addresses.list({ customerName: "Customer 123" }, function(err, data) {
    data.addresses.forEach(function(address) {
        console.log(address.friendlyName);
    });
});
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Address;
import com.twilio.sdk.resource.list.AddressList;
import java.util.HashMap;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Build a filter for the AddressList
    HashMap<String, String> params = new HashMap<String, String>();

    params.put("CustomerName", "Customer 123");

    AddressList addresses = client.getAccount().getAddresses(params);

    // Loop over addresses and print out a property for each one.
    for (Address address : addresses) {
      System.out.println(address.getFriendlyName());
    }

  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

# A list of address objects with the properties described above
addresses = client.addresses.list(customer_name="Customer 123")

for address in addresses:
    print(address.friendly_name)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.api.v2010.account.Address;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    ResourceSet<Address> addresses = Address.reader().setCustomerName("Customer 123").read();

    // Loop over addresses and print out a property for each one.
    for (Address address : addresses) {
      System.out.println(address.getFriendlyName());
    }
  }
}
{
    "page": 0,
    "page_size": 50,
    "uri":"/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses.json?CustomerName=Customer+123",
    "first_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses.json?Page=0&PageSize=50&CustomerName=Customer+123",
    "previous_page_uri": null,
    "next_page_uri": null,
    "addresses": [
        {
            "sid": "AD2a0747eba6abf96b7e3c3ff0b4530f6e",
            "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "friendly_name": "Billing - Customer 123",
            "customer_name": "Customer 123",
            "street": "1 Hasselhoff Lane",
            "city": "Berlin",
            "region": "Berlin",
            "postal_code": "10785",
            "iso_country": "DE",
        },
    ]
}
<TwilioResponse>
    <Addresses page="0" pagesize="50" uri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses?CustomerName=Customer+123" firstpageuri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses?CustomerName=Customer+123&Page=0&PageSize=50" previouspageuri="" nextpageuri="">
		<Address>
			<Sid>AD2a0747eba6abf96b7e3c3ff0b4530f6e</Sid>
			<DateCreated>Thu, 13 Nov 2008 07:56:24 +0000</DateCreated>
			<DateUpdated>Thu, 13 Nov 2008 08:45:58 +0000</DateUpdated>
			<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
			<FriendlyName>Billing - Customer 123</FriendlyName>
			<CustomerName>Customer 123</CustomerName>
			<Street>1 Hasselhoff Lane</Street>
			<City>Berlin</City>
			<Region>Berlin</Region>
			<PostalCode>10785</PostalCode>
			<IsoCountry>DE</IsoCountry>
			<ApiVersion>2010-04-01</ApiVersion>
			<Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AP3f94c94562ac88dccf16f8859a1a8b25</Uri>
		</Address>
	</Addresses>
</TwilioResponse>
List Get Example 2

HTTP POST

Creates a new Address within your account.

Required Parameters

Your request must include the following parameters:

Parameter Description
CustomerName Your name or business name, or that of your customer.
Street The number and street address where you or your customer is located.
City The city in which you or your customer is located.
Region The state or region in which you or your customer is located.
PostalCode The postal code in which you or your customer is located.
IsoCountry The ISO country code of your or your customer's address.
Optional Parameters

Your request may include the following parameters:

Parameter Description
FriendlyName A human-readable description of the new address. Maximum 64 characters.

If successful, Twilio will respond with a representation of the new address.

Address Validation Related Errors

Error Code Error Name Error Description
21615 Phone Number Requires a Local Address To purchase this number you must have an Address on your account which satisfies the local address requirements.
21628 Address Validation Error The address you have provided cannot be validated.
21629 Address Validation Error - Check Suggested Address The address you have provided cannot be validated. A similar address has been found to be valid. The suggested address is included in the error message body.

HTTP PUT

Not supported.

HTTP DELETE

Not supported.

Address Subresources

Dependent Phone Numbers Instance Subresource

Each Address instance resource supports a subresource for viewing which phone numbers are dependent on your existing addresses. In the case that you have two addresses which satisfy the requirement on a given phone number, this subresource will not return the phone number in the list.

Resource URI

/2010-04-01/Accounts/{AccountSid}/Addresses/{AddressSid}/DependentPhoneNumbers

HTTP GET

Returns a list of IncomingPhoneNumbers on your account that require the specified address.

Paging

The list includes paging information. If you plan on requesting more records than will fit on a single page, you should use the provided nextpageuri rather than incrementing through the pages by page number. Using the nextpageuri helps to ensure that your next request picks up where it left off and can prevent you from retrieving duplicate data if you are actively creating addresses.

Example 1

Show all phone numbers on your account that require the address AD2a0747eba6abf96b7e3c3ff0b4530f6e.

Loading Code Samples...
Language
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
  • XML
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AD2a0747eba6abf96b7e3c3ff0b4530f6e/DependentPhoneNumbers.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers are your accountSid and authToken from
// https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.addresses('AD2a0747eba6abf96b7e3c3ff0b4530f6e')
  .dependentPhoneNumbers
  .each((number) => console.log(number.friendlyName));
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AD2a0747eba6abf96b7e3c3ff0b4530f6e/DependentPhoneNumbers \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var dependentNumbers = twilio.ListDependentPhoneNumbers("AD2a0747eba6abf96b7e3c3ff0b4530f6e");

    foreach (var number in dependentNumbers.DependentPhoneNumbers)
    {
      Console.WriteLine(number.FriendlyName);
    }
  }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Services_Twilio($sid, $token);

$address = $client->account->addresses->get('AD2a0747eba6abf96b7e3c3ff0b4530f6e');
// Loop over the list of numbers and echo a property for each one
foreach ($address->dependent_phone_numbers as $number) {
    echo $number->friendly_name;
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token


# Loop over addresses and print out a property for each one
@address = @client.account.addresses.get('AD2a0747eba6abf96b7e3c3ff0b4530f6e')
@address.dependent_phone_numbers.list.each do |number|
  puts number.friendly_name
end
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Address;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        const string addressSid = "AD2a0747eba6abf96b7e3c3ff0b4530f6e";
        TwilioClient.Init(accountSid, authToken);

        var dependentNumbers = DependentPhoneNumberResource.Read(addressSid);

        foreach (var number in dependentNumbers)
        {
            Console.WriteLine(number.FriendlyName);
        }
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$address = $client
    ->addresses("AD2a0747eba6abf96b7e3c3ff0b4530f6e");

// Loop over the list of numbers and echo a property for each one
foreach ($address->dependentPhoneNumbers->read() as $number) {
    echo $number->friendlyName;
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

# A list of dependent phone number objects
numbers = client.dependent_phone_numbers('AD2a0747eba6abf96b7e3c3ff0b4530f6e').list()

for number in numbers:
    print(number.friendly_name)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# Initialize Twilio Client
@client = Twilio::REST::Client.new(account_sid, auth_token)

# Get address by sid
@address = @client.api.addresses('AD2a0747eba6abf96b7e3c3ff0b4530f6e').fetch

# Print friendly_name for each phone number
@address.dependent_phone_numbers.list.each do |number|
  puts number.friendly_name
end
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.addresses('AD2a0747eba6abf96b7e3c3ff0b4530f6e').dependentPhoneNumbers.list(
    function(err, data) {
        data.dependentPhoneNumbers.forEach(function(number) {
            console.log(number.friendlyName);
        });
});
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.DependentPhoneNumber;
import com.twilio.sdk.resource.list.DependentPhoneNumberList;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    DependentPhoneNumberList numbers = client.getAccount().getAddress("AD2a0747eba6abf96b7e3c3ff0b4530f6e").getDependentPhoneNumbers();

    // Loop over numbers and print out a property for each one.
    for (DependentPhoneNumber number : numbers) {
      System.out.println(number.getPhoneNumber());
    }

  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

# A list of dependent phone number objects
numbers = client.addresses('AD2a0747eba6abf96b7e3c3ff0b4530f6e') \
                .dependent_phone_numbers \
                .list()

for number in numbers:
    print(number.friendly_name)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.api.v2010.account.address.DependentPhoneNumber;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    ResourceSet<DependentPhoneNumber> numbers =
        DependentPhoneNumber.reader("AD2a0747eba6abf96b7e3c3ff0b4530f6e").read();

    // Loop over numbers and print out a property for each one.
    for (DependentPhoneNumber number : numbers) {
      System.out.println(number.getPhoneNumber());
    }
  }
}
{
    "page": 0,
    "page_size": 50,
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AD2a0747eba6abf96b7e3c3ff0b4530f6e/DependentPhoneNumbers.json",
    "first_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AD2a0747eba6abf96b7e3c3ff0b4530f6e/DependentPhoneNumbers.json?Page=0&PageSize=50",
    "previous_page_uri": null,
    "next_page_uri": null,
    "dependent_phone_numbers": [
        {
            "friendly_name": "(510) 555-1212",
            "phone_number": "+15105551212",
            "lata": "722",
            "rate_center": "OKLD TRNID",
            "latitude": "37.780000",
            "longitude": "-122.380000",
            "region": "CA",
            "postal_code": "94703",
            "iso_country": "US",
            "capabilities":{
                "voice":"true",
                "SMS":"true",
                "MMS":"false"
            }
            "address_requirements": "any"
        }
    ]
}
<TwilioResponse>
	<DependentPhoneNumbers page="0" pagesize="50" uri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AD2a0747eba6abf96b7e3c3ff0b4530f6e/DependentPhoneNumbers" firstpageuri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AD2a0747eba6abf96b7e3c3ff0b4530f6e/DependentPhoneNumbers?Page=0&PageSize=50" previouspageuri="" nextpageuri="">
		<DependentPhoneNumber>
			<Sid>PN2a0747eba6abf96b7e3c3ff0b4530f6e</Sid>
			<DateCreated>Thu, 13 Nov 2008 07:56:24 +0000</DateCreated>
			<DateUpdated>Thu, 13 Nov 2008 08:45:58 +0000</DateUpdated>
			<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
			<FriendlyName>(510) 555-1212</FriendlyName>
			<PhoneNumber>+15105551212</PhoneNumber>
			...
			<ApiVersion>2010-04-01</ApiVersion>
			<Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/IncomingPhoneNumbers/PN3f94c94562ac88dccf16f8859a1a8b25</Uri>
		</DependentPhoneNumber>
	</DependentPhoneNumbers>
</TwilioResponse>
List Dependent PNS Example 1

HTTP POST

Not supported.

HTTP PUT

Not supported.

HTTP DELETE

Not supported

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.

1 / 1
Loading Code Samples...
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
  • XML
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AD2a0747eba6abf96b7e3c3ff0b4530f6e.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers are your accountSid and authToken from
// https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.addresses('AD2a0747eba6abf96b7e3c3ff0b4530f6e')
  .fetch()
  .then((address) => console.log(address.customerName));
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AP2a0747eba6abf96b7e3c3ff0b4530f6e \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var app = twilio.GetAddress("AD2a0747eba6abf96b7e3c3ff0b4530f6e");

    Console.WriteLine(app.CustomerName);
  }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Services_Twilio($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$address = $client->account->addresses->get("AD2a0747eba6abf96b7e3c3ff0b4530f6e");
echo $address->customer_name;
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@address = @client.account.addresses.get("AP2a0747eba6abf96b7e3c3ff0b4530f6e")
puts @address.customer_name
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        TwilioClient.Init(accountSid, authToken);

        var address = AddressResource.Fetch("AD2a0747eba6abf96b7e3c3ff0b4530f6e");

        Console.WriteLine(address.CustomerName);
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$address = $client
    ->addresses("AD2a0747eba6abf96b7e3c3ff0b4530f6e")
    ->fetch();

echo $address->customerName;
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

address = client.addresses.get("AP2a0747eba6abf96b7e3c3ff0b4530f6e")
print(address.customer_name)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# Initialize Twilio Client
@client = Twilio::REST::Client.new(account_sid, auth_token)

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@address = @client.api.addresses('AP2a0747eba6abf96b7e3c3ff0b4530f6e').fetch

puts @address.customer_name
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.addresses("AD2a0747eba6abf96b7e3c3ff0b4530f6e").get(function(err, address) {
    console.log(address.customerName);
});
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Address;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Address address = client.getAccount().getAddress("AD2a0747eba6abf96b7e3c3ff0b4530f6e");
    System.out.println(address.getCustomerName());

  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

address = client.addresses("AP2a0747eba6abf96b7e3c3ff0b4530f6e") \
                .fetch()

print(address.customer_name)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.Address;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Address address = Address.fetcher("AD2a0747eba6abf96b7e3c3ff0b4530f6e").fetch();

    System.out.println(address.getCustomerName());
  }
}
{
    "sid": "AD2a0747eba6abf96b7e3c3ff0b4530f6e",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "friendly_name": "Billing - Customer 123",
    "customer_name": "Customer 123",
    "street": "1 Hasselhoff Lane",
    "city": "Berlin",
    "region": "Berlin",
    "postal_code": "10785",
    "iso_country": "DE",
}
<TwilioResponse>
	<Address>
		<Sid>AD2a0747eba6abf96b7e3c3ff0b4530f6e</Sid>
		<DateCreated>Mon, 16 Aug 2010 23:00:23 +0000</DateCreated>
		<DateUpdated>Mon, 16 Aug 2010 23:00:23 +0000</DateUpdated>
		<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
		<FriendlyName>Billing - Customer 123</FriendlyName>
		<CustomerName>Customer 123</CustomerName>
		<Street>1 Hasselhoff Lane</Street>
		<City>Berlin</City>
		<Region>Berlin</Region>
		<PostalCode>10785</PostalCode>
		<IsoCountry>DE</IsoCountry>
		<Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AD2a0747eba6abf96b7e3c3ff0b4530f6e</Uri>
	</Address>
</TwilioResponse>
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
  • XML
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AD2a0747eba6abf96b7e3c3ff0b4530f6e.json \
-d "CustomerName=Customer 456" \
-d "Street=2 Hasselhoff Lane" \
-u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers are your accountSid and authToken from
// https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.addresses('AD2a0747eba6abf96b7e3c3ff0b4530f6e')
  .update({
    customerName: 'Customer 456',
    street: '2 Hasselhoff Lane',
  })
  .then((address) => console.log(address.customerName));
$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AD2a0747eba6abf96b7e3c3ff0b4530f6e \
    -d "CustomerName=Customer 456" \
    -d "Street=2 Hasselhoff Lane" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var options = new AddressOptions();
    options.CustomerName = "Customer 456";
    options.Street = "2 Hasselhoff Lane";

    twilio.UpdateAddress("AD2a0747eba6abf96b7e3c3ff0b4530f6e", options);
  }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Services_Twilio($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$address = $client->account->addresses->get("AD2a0747eba6abf96b7e3c3ff0b4530f6e");
$address->update(array(
        "CustomerName" => "Customer 456",
        "Street" => "2 Hasselhoff Lane"
    ));
echo $address->customer_name;
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@address = @client.account.addresses.get("AD2a0747eba6abf96b7e3c3ff0b4530f6e")
@address.update(customer_name: "Customer 456",
  street: "2 Hasselhoff Lane")
puts @address.customer_name
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        TwilioClient.Init(accountSid, authToken);

        const string addressSid = "AD2a0747eba6abf96b7e3c3ff0b4530f6e";
        AddressResource.Update(addressSid,
                               customerName: "Customer 456",
                               street: "2 Hasselhoff Lane");
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$address = $client
    ->addresses("AD2a0747eba6abf96b7e3c3ff0b4530f6e")
    ->update(
        array(
            'customerName' => 'Customer 456',
            'street' => '2 Hasselhoff Lane'
        )
    );

echo $address->customerName;
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

address = client.addresses.update(
    "AD2a0747eba6abf96b7e3c3ff0b4530f6e",
    customer_name="Customer 456",
    street="2 Hasselhoff Lane")
print(address.customer_name)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# Initialize Twilio Client
@client = Twilio::REST::Client.new account_sid, auth_token

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@address = @client.api.addresses('AD2a0747eba6abf96b7e3c3ff0b4530f6e').fetch

@address.update(
  customer_name: 'Customer 456',
  street: '2 Hasselhoff Lane'
)

puts @address.customer_name
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.addresses("AD2a0747eba6abf96b7e3c3ff0b4530f6e").post({
    customerName: "Customer 456",
    street: "2 Hasselhoff Lane"
}, function(err, address) {
    console.log(address.customerName);
});
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Address;
import com.twilio.sdk.resource.list.AddressList;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Address address = client.getAccount().getAddress("AD2a0747eba6abf96b7e3c3ff0b4530f6e");
    // Build a filter for the AddressList
    List<NameValuePair> params = new ArrayList<NameValuePair>();
    params.add(new BasicNameValuePair("CustomerName", "Customer 456"));
    params.add(new BasicNameValuePair("Street", "2 Hasselhoff Lane"));
    address.update(params);

  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

address = client.addresses("AD2a0747eba6abf96b7e3c3ff0b4530f6e") \
                .update(customer_name="Customer 456",
                        street="2 Hasselhoff Lane")

print(address.customer_name)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.Address;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Address address = Address.updater("AD2a0747eba6abf96b7e3c3ff0b4530f6e")
        .setCustomerName("Customer 456").setStreet("2 Hasselhoff Lane").update();

    System.out.println(address.getDateUpdated());
  }
}
{
    "sid": "AD2a0747eba6abf96b7e3c3ff0b4530f6e",
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "friendly_name": "Billing - Customer 123",
    "customer_name": "Customer 456",
    "street": "2 Hasselhoff Lane",
    "city": "Berlin",
    "region": "Berlin",
    "postal_code": "10785",
    "iso_country": "DE",
}
<TwilioResponse>
	<Address>
		<Sid>AD2a0747eba6abf96b7e3c3ff0b4530f6e</Sid>
		<DateCreated>Mon, 16 Aug 2010 23:00:23 +0000</DateCreated>
		<DateUpdated>Mon, 16 Aug 2010 23:00:23 +0000</DateUpdated>
		<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
		<FriendlyName>Billing - Customer 123</FriendlyName>
		<CustomerName>Customer 456</CustomerName>
		<Street>2 Hasselhoff Lane</Street>
		<City>Berlin</City>
		<Region>Berlin</Region>
		<PostalCode>10785</PostalCode>
		<IsoCountry>DE</IsoCountry>
		<ApiVersion>2010-04-01</ApiVersion>
		<Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AD2a0747eba6abf96b7e3c3ff0b4530f6e</Uri>
	</Address>
</TwilioResponse>
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
  • XML
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers are your accountSid and authToken from
// https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.addresses.each((address) => console.log(address.friendlyName));
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var addresses = twilio.ListAddresses();

    foreach (var address in addresses.Addresses)
    {
      Console.WriteLine(address.FriendlyName);
    }
  }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Services_Twilio($sid, $token);

// Loop over the list of addresses and echo a property for each one
foreach ($client->account->addresses as $address) {
    echo $address->friendly_name;
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token


# Loop over addresses and print out a property for each one
@client.account.addresses.list.each do |address|
  puts address.friendly_name
end
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        TwilioClient.Init(accountSid, authToken);

        var addresses = AddressResource.Read();

        foreach (var address in addresses)
        {
            Console.WriteLine(address.FriendlyName);
        }
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Loop over the list of numbers and echo a property for each one
foreach ($client->addresses->read() as $address) {
    echo $address->friendlyName;
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

# A list of address objects with the properties described above
addresses = client.addresses.list()

for address in addresses:
    print(address.friendly_name)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# Initialize Twilio Client
@client = Twilio::REST::Client.new(account_sid, auth_token)

# Loop over addresses and print out a property for each one
@client.addresses.list.each do |address|
  puts address.friendly_name
end
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.addresses.list(function(err, data) {
    data.addresses.forEach(function(address) {
        console.log(address.friendlyName);
    });
});
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Address;
import com.twilio.sdk.resource.list.AddressList;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    AddressList addresses = client.getAccount().getAddresses();

    // Loop over addresses and print out a property for each one.
    for (Address address : addresses) {
      System.out.println(address.getFriendlyName());
    }

  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

# A list of address objects with the properties described above
addresses = client.addresses.list()

for address in addresses:
    print(address.friendly_name)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.api.v2010.account.Address;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    ResourceSet<Address> addresses = Address.reader().read();

    // Loop over addresses and print out a property for each one.
    for (Address address : addresses) {
      System.out.println(address.getFriendlyName());
    }
  }
}
{
    "page": 0,
    "page_size": 50,
    "uri":"/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses.json",
    "first_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses.json?Page=0&PageSize=50",
    "previous_page_uri": null,
    "next_page_uri": null,
    "addresses": [
        {
            "sid": "AD2a0747eba6abf96b7e3c3ff0b4530f6e",
            "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "friendly_name": "Billing - Customer 123",
            "customer_name": "Customer 123",
            "street": "1 Hasselhoff Lane",
            "city": "Berlin",
            "region": "Berlin",
            "postal_code": "10785",
            "iso_country": "DE",
        },
    ]
}
<TwilioResponse>
	<Addresses page="0" pagesize="50" uri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses" firstpageuri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses?Page=0&PageSize=50" previouspageuri="" nextpageuri="">
		<Address>
			<Sid>AD2a0747eba6abf96b7e3c3ff0b4530f6e</Sid>
			<DateCreated>Thu, 13 Nov 2008 07:56:24 +0000</DateCreated>
			<DateUpdated>Thu, 13 Nov 2008 08:45:58 +0000</DateUpdated>
			<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
			<FriendlyName>Billing - Customer 123</FriendlyName>
			<CustomerName>Customer 123</CustomerName>
			<Street>1 Hasselhoff Lane</Street>
			<City>Berlin</City>
			<Region>Berlin</Region>
			<PostalCode>10785</PostalCode>
			<IsoCountry>DE</IsoCountry>
			<ApiVersion>2010-04-01</ApiVersion>
			<Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AP3f94c94562ac88dccf16f8859a1a8b25</Uri>
		</Address>
	</Addresses>
</TwilioResponse>
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
  • XML
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses.json?CustomerName=Customer+123 \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers are your accountSid and authToken from
// https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.addresses
  .each({customerName: 'Customer 123'}, (address) => address.friendlyName);
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses?CustomerName=Customer+123 \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);
    var options = new AddressListRequest();
    options.CustomerName = "Customer 123";

    var addresses = twilio.ListAddresses(options);

    foreach (var address in addresses.Addresses)
    {
      Console.WriteLine(address.FriendlyName);
    }
  }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Services_Twilio($sid, $token);

// Loop over the list of addresses and echo a property for each one
foreach ($client->account->addresses->getIterator(0, 50, array(
	"CustomerName" => "Customer 123"
    )) as $address) {
    echo $address->friendly_name;
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token


# Loop over addresses and print out a property for each one
@client.account.addresses.list(customer_name: "Customer 123").each do |address|
  puts address.friendly_name
end
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        TwilioClient.Init(accountSid, authToken);

        var addresses = AddressResource.Read(customerName: "Customer 123");

        foreach (var address in addresses)
        {
            Console.WriteLine(address.FriendlyName);
        }
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$addresses = $client->addresses->read(
    array('customerName' => 'Customer 123')
);
// Loop over the list of numbers and echo a property for each one
foreach ($addresses as $address) {
    echo $address->friendlyName;
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

# A list of address objects with the properties described above
addresses = client.addresses.list(customer_name="Customer 123")

for address in addresses:
    print(address.friendly_name)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# Initialize Twilio Client
@client = Twilio::REST::Client.new(account_sid, auth_token)

# Loop over addresses and print out a property for each one
@client.addresses.list(customer_name: 'Customer 123')
       .each do |address|
         puts address.friendly_name
       end
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.addresses.list({ customerName: "Customer 123" }, function(err, data) {
    data.addresses.forEach(function(address) {
        console.log(address.friendlyName);
    });
});
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Address;
import com.twilio.sdk.resource.list.AddressList;
import java.util.HashMap;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Build a filter for the AddressList
    HashMap<String, String> params = new HashMap<String, String>();

    params.put("CustomerName", "Customer 123");

    AddressList addresses = client.getAccount().getAddresses(params);

    // Loop over addresses and print out a property for each one.
    for (Address address : addresses) {
      System.out.println(address.getFriendlyName());
    }

  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

# A list of address objects with the properties described above
addresses = client.addresses.list(customer_name="Customer 123")

for address in addresses:
    print(address.friendly_name)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.api.v2010.account.Address;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    ResourceSet<Address> addresses = Address.reader().setCustomerName("Customer 123").read();

    // Loop over addresses and print out a property for each one.
    for (Address address : addresses) {
      System.out.println(address.getFriendlyName());
    }
  }
}
{
    "page": 0,
    "page_size": 50,
    "uri":"/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses.json?CustomerName=Customer+123",
    "first_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses.json?Page=0&PageSize=50&CustomerName=Customer+123",
    "previous_page_uri": null,
    "next_page_uri": null,
    "addresses": [
        {
            "sid": "AD2a0747eba6abf96b7e3c3ff0b4530f6e",
            "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "friendly_name": "Billing - Customer 123",
            "customer_name": "Customer 123",
            "street": "1 Hasselhoff Lane",
            "city": "Berlin",
            "region": "Berlin",
            "postal_code": "10785",
            "iso_country": "DE",
        },
    ]
}
<TwilioResponse>
    <Addresses page="0" pagesize="50" uri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses?CustomerName=Customer+123" firstpageuri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses?CustomerName=Customer+123&Page=0&PageSize=50" previouspageuri="" nextpageuri="">
		<Address>
			<Sid>AD2a0747eba6abf96b7e3c3ff0b4530f6e</Sid>
			<DateCreated>Thu, 13 Nov 2008 07:56:24 +0000</DateCreated>
			<DateUpdated>Thu, 13 Nov 2008 08:45:58 +0000</DateUpdated>
			<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
			<FriendlyName>Billing - Customer 123</FriendlyName>
			<CustomerName>Customer 123</CustomerName>
			<Street>1 Hasselhoff Lane</Street>
			<City>Berlin</City>
			<Region>Berlin</Region>
			<PostalCode>10785</PostalCode>
			<IsoCountry>DE</IsoCountry>
			<ApiVersion>2010-04-01</ApiVersion>
			<Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AP3f94c94562ac88dccf16f8859a1a8b25</Uri>
		</Address>
	</Addresses>
</TwilioResponse>
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
  • xml
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
  • XML
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AD2a0747eba6abf96b7e3c3ff0b4530f6e/DependentPhoneNumbers.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the Node helper library from twilio.com/docs/node/install
// These identifiers are your accountSid and authToken from
// https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.addresses('AD2a0747eba6abf96b7e3c3ff0b4530f6e')
  .dependentPhoneNumbers
  .each((number) => console.log(number.friendlyName));
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AD2a0747eba6abf96b7e3c3ff0b4530f6e/DependentPhoneNumbers \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var dependentNumbers = twilio.ListDependentPhoneNumbers("AD2a0747eba6abf96b7e3c3ff0b4530f6e");

    foreach (var number in dependentNumbers.DependentPhoneNumbers)
    {
      Console.WriteLine(number.FriendlyName);
    }
  }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Services_Twilio($sid, $token);

$address = $client->account->addresses->get('AD2a0747eba6abf96b7e3c3ff0b4530f6e');
// Loop over the list of numbers and echo a property for each one
foreach ($address->dependent_phone_numbers as $number) {
    echo $number->friendly_name;
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token


# Loop over addresses and print out a property for each one
@address = @client.account.addresses.get('AD2a0747eba6abf96b7e3c3ff0b4530f6e')
@address.dependent_phone_numbers.list.each do |number|
  puts number.friendly_name
end
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Address;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        const string addressSid = "AD2a0747eba6abf96b7e3c3ff0b4530f6e";
        TwilioClient.Init(accountSid, authToken);

        var dependentNumbers = DependentPhoneNumberResource.Read(addressSid);

        foreach (var number in dependentNumbers)
        {
            Console.WriteLine(number.FriendlyName);
        }
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$address = $client
    ->addresses("AD2a0747eba6abf96b7e3c3ff0b4530f6e");

// Loop over the list of numbers and echo a property for each one
foreach ($address->dependentPhoneNumbers->read() as $number) {
    echo $number->friendlyName;
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

# A list of dependent phone number objects
numbers = client.dependent_phone_numbers('AD2a0747eba6abf96b7e3c3ff0b4530f6e').list()

for number in numbers:
    print(number.friendly_name)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# Initialize Twilio Client
@client = Twilio::REST::Client.new(account_sid, auth_token)

# Get address by sid
@address = @client.api.addresses('AD2a0747eba6abf96b7e3c3ff0b4530f6e').fetch

# Print friendly_name for each phone number
@address.dependent_phone_numbers.list.each do |number|
  puts number.friendly_name
end
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.addresses('AD2a0747eba6abf96b7e3c3ff0b4530f6e').dependentPhoneNumbers.list(
    function(err, data) {
        data.dependentPhoneNumbers.forEach(function(number) {
            console.log(number.friendlyName);
        });
});
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.DependentPhoneNumber;
import com.twilio.sdk.resource.list.DependentPhoneNumberList;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    DependentPhoneNumberList numbers = client.getAccount().getAddress("AD2a0747eba6abf96b7e3c3ff0b4530f6e").getDependentPhoneNumbers();

    // Loop over numbers and print out a property for each one.
    for (DependentPhoneNumber number : numbers) {
      System.out.println(number.getPhoneNumber());
    }

  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

# A list of dependent phone number objects
numbers = client.addresses('AD2a0747eba6abf96b7e3c3ff0b4530f6e') \
                .dependent_phone_numbers \
                .list()

for number in numbers:
    print(number.friendly_name)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.api.v2010.account.address.DependentPhoneNumber;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    ResourceSet<DependentPhoneNumber> numbers =
        DependentPhoneNumber.reader("AD2a0747eba6abf96b7e3c3ff0b4530f6e").read();

    // Loop over numbers and print out a property for each one.
    for (DependentPhoneNumber number : numbers) {
      System.out.println(number.getPhoneNumber());
    }
  }
}
{
    "page": 0,
    "page_size": 50,
    "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AD2a0747eba6abf96b7e3c3ff0b4530f6e/DependentPhoneNumbers.json",
    "first_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AD2a0747eba6abf96b7e3c3ff0b4530f6e/DependentPhoneNumbers.json?Page=0&PageSize=50",
    "previous_page_uri": null,
    "next_page_uri": null,
    "dependent_phone_numbers": [
        {
            "friendly_name": "(510) 555-1212",
            "phone_number": "+15105551212",
            "lata": "722",
            "rate_center": "OKLD TRNID",
            "latitude": "37.780000",
            "longitude": "-122.380000",
            "region": "CA",
            "postal_code": "94703",
            "iso_country": "US",
            "capabilities":{
                "voice":"true",
                "SMS":"true",
                "MMS":"false"
            }
            "address_requirements": "any"
        }
    ]
}
<TwilioResponse>
	<DependentPhoneNumbers page="0" pagesize="50" uri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AD2a0747eba6abf96b7e3c3ff0b4530f6e/DependentPhoneNumbers" firstpageuri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/AD2a0747eba6abf96b7e3c3ff0b4530f6e/DependentPhoneNumbers?Page=0&PageSize=50" previouspageuri="" nextpageuri="">
		<DependentPhoneNumber>
			<Sid>PN2a0747eba6abf96b7e3c3ff0b4530f6e</Sid>
			<DateCreated>Thu, 13 Nov 2008 07:56:24 +0000</DateCreated>
			<DateUpdated>Thu, 13 Nov 2008 08:45:58 +0000</DateUpdated>
			<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
			<FriendlyName>(510) 555-1212</FriendlyName>
			<PhoneNumber>+15105551212</PhoneNumber>
			...
			<ApiVersion>2010-04-01</ApiVersion>
			<Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/IncomingPhoneNumbers/PN3f94c94562ac88dccf16f8859a1a8b25</Uri>
		</DependentPhoneNumber>
	</DependentPhoneNumbers>
</TwilioResponse>