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 regulations, 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 the error code 21628 is returned. If the address submitted is not an exact match but is similar to a valid address, we'll create the Address using the valid address we found, unless you include the AutoCorrectAddress=false parameter in the request. In that case, 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.
Whether the address has been validated to comply with local regulation. In countries that require valid addresses, an invalid address will not be accepted. true indicates the Address has been validated. false indicate the country doesn't require validation or the Address is not valid.
Whether the address has been verified to comply with regulation. In countries that require valid addresses, an invalid address will not be accepted. true indicates the Address has been verified. false indicate the country doesn't require verified or the Address is not valid.
Whether we should automatically correct the address. Can be: true or false and the default is true. If empty or true, we will correct the address you provide if necessary. If false, we won't alter the address you provide.
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.
Fetch an Address resource
GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json
GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Addresses.json
Returns a list of Address resource representations, each representing an
address within your account. The list includes [paging information][paging-info].
GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Addresses/{AddressSid}/DependentPhoneNumbers.json
Returns a list of IncomingPhoneNumbers on your account that require the
specified address.
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 that satisfy the requirement on a given phone number, this
subresource will not return the phone number in the list.
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.
Update an Address resource
POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json
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 all fields but IsoCountry can be updated using a POST request.
To update the IsoCountry, a new Address must be created.
Whether we should automatically correct the address. Can be: true or false and the default is true. If empty or true, we will correct the address you provide if necessary. If false, we won't alter the address you provide.
If this address is required for any active IncomingPhoneNumbers, it cannot be
deleted and you will receive Error [21625][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.