Get all addresses
The GET /addresses
endpoint gets a list of all addresses within the VCC account.
Only PSTN addresses are returned by this endpoint. API addresses are excluded.
Most URLs in the example code use the following values:
- ***. To access the API for your region, replace *** with the correct subdomain for your region:
Region URL subdomain Base URL EMEA emea https://emea.api.newvoicemedia.com USA nam https://nam.api.newvoicemedia.com APAC apac https://apac.api.newvoicemedia.com - <ACCESS_TOKEN>. The value represents a bearer access token which you must use to validate every request. Replace <ACCESS_TOKEN> where used with your bearer access token. For information about getting a bearer access token, see How to authenticate with a Vonage Contact Center (VCC) API.
Headers
Header parameters in Requests (User Admin API) apply to this endpoint.
Authorization scopes supported:
Scope | Access granted |
---|---|
users:read | Entire endpoint |
users:write | Entire endpoint |
Parameters
The endpoint accepts the following query parameters:
limit
Type | Required | Example |
---|---|---|
integer | False | 25 |
The required number of items per page. Minimum of 1. Maximum of 5000. Default is 25.
page
Type | Required | Example |
---|---|---|
integer | False | 1 |
The required page. Minimum of 1, maximum of 1000000000. Default is 1.
Requests
Request all addresses
curl -L -X GET "https://***.api.newvoicemedia.com/useradmin/addresses" \ -H "Accept: application/vnd.newvoicemedia.v4+json" \ -H "Authorization: Bearer <ACCESS_TOKEN>"
Request second page of addresses
curl -L -X GET "https://***.api.newvoicemedia.com/useradmin/addresses?page=2" \ -H "Accept: application/vnd.newvoicemedia.v4+json" \ -H "Authorization: Bearer <ACCESS_TOKEN>"
Responses
Responses contain a list of all addresses within the VCC account.
Successful response
Successful requests return a 200 Success
code and a collection of addresses.
Example response
{ "meta": { "page": 1, "count": 2, "pageCount": 1, "totalCount": 2 }, "addresses": [ { "addressId": "441234567890" }, { "addressId": "441234567899" } ] }
where:
addresses
. A collection of addresses.addressId
. The unique ID of the address.
For information, see Trying out Vonage Contact Center APIs.