Skip to main content

List all addresses

GET 
/addresses

Returns a list of your addresses.

Request

Query Parameters

    page[number] integer

    Possible values: >= 1

    Default value: 1

    The page number to load

    page[size] integer

    Possible values: >= 1 and <= 250

    Default value: 20

    The size of the page

    filter[customer_reference][eq] string

    Filter addresses via the customer reference set. Matching is not case-sensitive.

    filter[customer_reference][contains] string

    If present, addresses with customer_reference containing the given value will be returned. Matching is not case-sensitive.

    filter[used_as_emergency] string

    Default value: null

    If set as 'true', only addresses used as the emergency address for at least one active phone-number will be returned. When set to 'false', the opposite happens: only addresses not used as the emergency address from phone-numbers will be returned.

    filter[street_address][contains] string

    Default value: null

    If present, addresses with street_address containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters.

    filter[address_book][eq] string

    Default value: null

    If present, only returns results with the address_book flag set to the given value.

    sort string

    Possible values: [created_at, first_name, last_name, business_name, street_address]

    Default value: created_at

    Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

    That is:

    • street_address: sorts the result by the street_address field in ascending order.
    • -street_address: sorts the result by the street_address field in descending order.

    If not given, results are sorted by
    created_at
    in descending order.

Responses

200: Successful response

400: Bad request

401: Unauthorized

404: Resource not found

Request samples


curl -L 'https://api.telnyx.com/v2/addresses' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'

Response samples


{
"data": [
{
"id": "1293384261075731499",
"record_type": "address",
"customer_reference": "MY REF 001",
"first_name": "Alfred",
"last_name": "Foster",
"business_name": "Toy-O'Kon",
"phone_number": "+12125559000",
"street_address": "311 W Superior Street",
"extended_address": "#504",
"locality": "Chicago",
"administrative_area": "IL",
"neighborhood": "Ciudad de los deportes",
"borough": "Guadalajara",
"postal_code": "60654",
"country_code": "US",
"address_book": false,
"validate_address": true,
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
],
"meta": {
"total_pages": 3,
"total_results": 55,
"page_number": 2,
"page_size": 25
}
}