REST API –

Add and Remove Addresses

About

Add and remove addresses from your account with ease using the following requests. Addresses can be retrieved using the Get Addresses request and assigned to numbers with a Configure Numbers request.

Resource URIs

Add addresses with the POST call. Remove specified addresses with the DELETE call.

POST
/v2/Accounts/[AccountSid]/Addresses
DELETE
/v2/Addresses/[AddressSid]

Request

URI Parameters

Parameter Type Description
AccountSid string Secure identification of an account.
AddressSid string Secure identification of an address to remove.

POST Parameters

These parameters are for adding an address to the specified account.

Parameter Type Description
Friendly (Optional) string A friendly name to associate the address with. Useful for internal reference.
Reference (Optional) string A definable reference string. Useful for internal association.
Line1 string Address line 1.
Line2 (Optional) string Address line 2.
City string City name.
Region (Optional) string Region address resides in.
CountryCode string Country code of the address. E.g AU or US
PostalCode (Optional) string Postal code of the address. E.g. 2620.

Response

200 – OK

Our service will respond to every address request with JSON formatted data. POST requests will respond with the details of the newly created address details. Successful DELETE requests will respond with the address identification that was removed.

POST Response Parameters
Parameter Type Description
AddressSid string The address secure identifier created for the new address.
AccountSid string The account secure identifier associated with the address.
Friendly string The friendly name associated with the address (if assigned).
Reference string A custom reference associated with the address.
Line1 string Address Line 1
Line2 string Address Line 2
City string City name (if applicable).
Region string Region of address.
CountryCode string Country code of the address. E.g AU or US
PostalCode string Postal code of the address. E.g. 2620.
Status string Status of the address. In most cases, addresses will be approved immediately. May be: Active : Address is active and numbers can be registered against it. Pending : The address is pending verification. Numbers cannot yet be registered. Rejected : Address information was deemed incorrect. Re-submission is required.
DELETE Response Parameters
Parameter Type Description
AddressSid string The address secure identifier of the address that was removed.

400 – Error

POST requests will return with an error if there are missing or invalid parameters. The response message should be helpful in conducting a successful request. An address DELETE request will be rejected if there are numbers currently relying on it for registration. For error codes and messages, please refer here.