Connections API

Connections operations API

List connections

Returns a list of your connections irrespective of type.

SecuritybearerAuth
Request
query Parameters
page[number]
integer >= 1
Default: 1

The page number to load

page[size]
integer [ 1 .. 250 ]
Default: 20

The size of the page

filter[connection_name][contains]
string
Default: null

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

sort
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 - prefix.

That is:

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

If not given, results are sorted by created_at in descending order.
Enum: "created_at" "connection_name" "active"
Example: sort=connection_name
Responses
200

Successful response with a list of connections.

Response Schema: application/json
Array of objects (Connection)
object (PaginationMeta)
400

Bad request

401

Unauthorized

404

Resource not found

get/connections
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

telnyx.Connection.list(page={"number":1,"size":20})
Response samples
application/json
{
  • "data": [
    • {
      • "active": true,
      • "anchorsite_override": "Latency",
      • "connection_name": "string",
      • "created_at": "2018-02-02T22:25:27.521Z",
      • "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
      • "outbound_voice_profile_id": "1293384261075731499",
      • "record_type": "ip_connection",
      • "updated_at": "2018-02-02T22:25:27.521Z",
      • "webhook_api_version": "1",
      • "webhook_event_failover_url": "https://failover.example.com",
      • "webhook_event_url": "https://example.com"
      }
    ],
  • "meta": {
    • "page_number": 2,
    • "page_size": 25,
    • "total_pages": 3,
    • "total_results": 55
    }
}

Retrieve a connection

Retrieves the high-level details of an existing connection. To retrieve specific authentication information, use the endpoint for the specific connection type.

SecuritybearerAuth
Request
path Parameters
id
required
string

IP Connection ID

Responses
200

Successful response with details about a connection.

Response Schema: application/json
object (Connection)
active
boolean

Defaults to true

anchorsite_override
string (AnchorsiteOverride)

Latency directs Telnyx to route media through the site with the lowest round-trip time to the user's connection. Telnyx calculates this time using ICMP ping messages. This can be disabled by specifying a site to handle all media.

Enum: "Latency" "Chicago, IL" "Ashburn, VA" "San Jose, CA" "Sydney, Australia" "Amsterdam, Netherlands" "London, UK" "Toronto, Canada" "Vancouver, Canada" "Frankfurt, Germany"
connection_name
string
created_at
string

ISO 8601 formatted date indicating when the resource was created.

id
string <int64>

Identifies the specific resource.

outbound_voice_profile_id
string <int64> (OutboundVoiceProfileId)

Identifies the associated outbound voice profile.

record_type
string

Identifies the type of the resource.

updated_at
string

ISO 8601 formatted date indicating when the resource was updated.

webhook_api_version
string
Default: "1"

Determines which webhook format will be used, Telnyx API v1 or v2.

Enum: "1" "2"
webhook_event_failover_url
string <url>
Default: ""

The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails.

webhook_event_url
string <url>
Default: null

The URL where webhooks related to this connection will be sent.

401

Unauthorized

404

Resource not found

422

Bad request

get/connections/{id}
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

telnyx.Connection.retrieve("id")
Response samples
application/json
{
  • "data": {
    • "active": true,
    • "anchorsite_override": "Latency",
    • "connection_name": "string",
    • "created_at": "2018-02-02T22:25:27.521Z",
    • "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "outbound_voice_profile_id": "1293384261075731499",
    • "record_type": "ip_connection",
    • "updated_at": "2018-02-02T22:25:27.521Z",
    • "webhook_api_version": "1",
    • "webhook_event_failover_url": "https://failover.example.com",
    • "webhook_event_url": "https://example.com"
    }
}