Skip to main content

List all phone numbers

GET 
/external_connections/:id/phone_numbers

Returns a list of all active phone numbers associated with the given external connection.

Request

Path Parameters

    id int64required

    Identifies the resource.

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: 250

    The size of the page

    filter[phone_number][eq] E164

    The phone number to filter by

    filter[phone_number][contains] string

    The partial phone number to filter by. Requires 3-15 digits.

    filter[phone_number][contains] string

    If present, connections associated with the given phone_number will be returned. A full match is necessary with a e164 format.

    filter[civic_address_id][eq] uuid

    The civic address ID to filter by

    filter[location_id][eq] uuid

    The location ID to filter by

Responses

200: Successful response

401: Unauthorized

404: Not found

422: Bad request

Request samples


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

Response samples


{
"data": [
{
"ticket_id": "542c3bca-d247-42bc-8fe7-e01d16ecd761",
"telephone_number": "string",
"number_id": "string",
"civic_address_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"location_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"displayed_country_code": "string",
"acquired_capabilities": [
"FirstPartyAppAssignment"
]
}
],
"meta": {
"total_pages": 3,
"total_results": 55,
"page_number": 2,
"page_size": 25
}
}