Skip to main content
GET
/
connections
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const connections = await client.connections.list();

console.log(connections.data);
{
  "data": [
    {
      "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
      "record_type": "ip_connection",
      "active": true,
      "anchorsite_override": "Latency",
      "connection_name": "string",
      "created_at": "2018-02-02T22:25:27.521Z",
      "updated_at": "2018-02-02T22:25:27.521Z",
      "webhook_event_url": "https://example.com",
      "webhook_event_failover_url": "https://failover.example.com",
      "webhook_api_version": "1",
      "outbound_voice_profile_id": "1293384261075731499"
    }
  ],
  "meta": {
    "total_pages": 3,
    "total_results": 55,
    "page_number": 2,
    "page_size": 25
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

filter
object

Consolidated filter parameter (deepObject style). Originally: filter[connection_name], filter[fqdn], filter[outbound_voice_profile_id], filter[outbound.outbound_voice_profile_id]

page
object

Consolidated page parameter (deepObject style). Originally: page[size], page[number]

sort
enum<string>
default:created_at

Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the <code> -</code> prefix.<br/><br/> That is: <ul>

<li> <code>connection_name</code>: sorts the result by the <code>connection_name</code> field in ascending order. </li> <li> <code>-connection_name</code>: sorts the result by the <code>connection_name</code> field in descending order. </li> </ul> <br/> If not given, results are sorted by <code>created_at</code> in descending order.
Available options:
created_at,
connection_name,
active
Example:

"connection_name"

Response

Successful response with a list of connections.

data
Connection · object[]
meta
Pagination Meta · object