This is the API V2 documentation. To switch out of beta revert back to our API V1.

Open SidemenuAPI Reference
API Reference
Close Sidemenu

Call Control Applications

List all Call Control ApplicationsfindCallControlApplications

get https://api.telnyx.com/v2/call_control_applications

Returns a list of your Call Control applications.

curl -X GET \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --globoff "https://api.telnyx.com/v2/call_control_applications?page[number]=1&page[size]=20"
Parameters
In query
page[number]
integer (1)
optional

The page number to load

Default: 1
page[size]
integer (1 - 250)
optional

The size of the page

Default: 20
filter[application_name][contains]
string
optional

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

Default: "null"
filter[outbound.outbound_voice_profile_id]
string (int64)
optional

Identifies the associated outbound voice profile.

Example: "1293384261075731499"
sort
string
optional

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.

Default: "created_at"
Example: "connection_name"
Options: [ "created_at", "connection_name", "active" ]
Responses
200

Successful response

400

Bad request

401

Unauthorized

404

Resource not found

Success Response
{
  "data": [
    {
      "active": false,
      "anchorsite_override": "Amsterdam, Netherlands",
      "application_name": "call-router",
      "created_at": "2018-02-02T22:25:27.521Z",
      "dtmf_type": "Inband",
      "first_command_timeout": true,
      "first_command_timeout_secs": 10,
      "id": "1293384261075731499",
      "inbound": {
        "channel_limit": 10,
        "sip_subdomain": "example",
        "sip_subdomain_receive_settings": "only_my_connections"
      },
      "outbound": {
        "channel_limit": 10,
        "outbound_voice_profile_id": "1293384261075731499"
      },
      "record_type": "call_control_application",
      "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",
      "webhook_timeout_secs": 25
    }
  ],
  "meta": {
    "page_number": 2,
    "page_size": 25,
    "total_pages": 3,
    "total_results": 55
  }
}

Creates a Call Control ApplicationCreateCallControlApplication

post https://api.telnyx.com/v2/call_control_applications

Creates a Call Control application.

curl -X POST \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --data '{"active":false,"anchorsite_override":"Amsterdam, Netherlands"}' \
  https://api.telnyx.com/v2/call_control_applications
Parameters
In body
application_name
string
required

A user-assigned name to help manage the application.

Example: "call-router"
webhook_event_url
string (url)
required

The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.

Example: "https://example.com"
active
boolean
optional

Specifies whether the connection can be used.

Default: true
anchorsite_override
string
optional

`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.

Default: "Latency"
Example: "Amsterdam, Netherlands"
Options: [ "Latency", "Chicago, IL", "Ashburn, VA", "San Jose, CA", "Sydney, Australia", "Amsterdam, Netherlands", "London, UK", "Toronto, Canada", "Vancouver, Canada", "Frankfurt, Germany" ]
dtmf_type
string
optional

Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF digits sent to Telnyx will be accepted in all formats.

Default: "RFC 2833"
Example: "Inband"
Options: [ "RFC 2833", "Inband", "SIP INFO" ]
first_command_timeout
boolean
optional

Specifies whether calls to phone numbers associated with this connection should hangup after timing out.

Default: false
Example: true
first_command_timeout_secs
integer
optional

Specifies how many seconds to wait before timing out a dial command.

Default: 30
Example: 10
inbound
object
optional
outbound
object
optional
webhook_api_version
string
optional

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

Default: "1"
Example: "1"
Options: [ "1", "2" ]
webhook_event_failover_url
string (url)
optional

The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.

Default: ""
Example: "https://failover.example.com"
webhook_timeout_secs
integer (0 - 30)
optional

Specifies how many seconds to wait before timing out a webhook.

Default: null
Example: 25
Responses
201

Successful response

422

Bad request

Success Response
{
  "data": {
    "active": false,
    "anchorsite_override": "Amsterdam, Netherlands",
    "application_name": "call-router",
    "created_at": "2018-02-02T22:25:27.521Z",
    "dtmf_type": "Inband",
    "first_command_timeout": true,
    "first_command_timeout_secs": 10,
    "id": "1293384261075731499",
    "inbound": {
      "channel_limit": 10,
      "sip_subdomain": "example",
      "sip_subdomain_receive_settings": "only_my_connections"
    },
    "outbound": {
      "channel_limit": 10,
      "outbound_voice_profile_id": "1293384261075731499"
    },
    "record_type": "call_control_application",
    "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",
    "webhook_timeout_secs": 25
  }
}

Retrieve a Call Control ApplicationgetCallControlApplication

get https://api.telnyx.com/v2/call_control_applications/{id}

Retrieves the details of an existing Call Control application.

curl -X GET \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --globoff "https://api.telnyx.com/v2/call_control_applications/1293384261075731499"
Parameters
In path
id
string (int64)
required

Identifies the resource.

Example: "1293384261075731499"
Responses
200

Successful response

401

Unauthorized

404

Resource not found

422

Bad request

Success Response
{
  "data": {
    "active": false,
    "anchorsite_override": "Amsterdam, Netherlands",
    "application_name": "call-router",
    "created_at": "2018-02-02T22:25:27.521Z",
    "dtmf_type": "Inband",
    "first_command_timeout": true,
    "first_command_timeout_secs": 10,
    "id": "1293384261075731499",
    "inbound": {
      "channel_limit": 10,
      "sip_subdomain": "example",
      "sip_subdomain_receive_settings": "only_my_connections"
    },
    "outbound": {
      "channel_limit": 10,
      "outbound_voice_profile_id": "1293384261075731499"
    },
    "record_type": "call_control_application",
    "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",
    "webhook_timeout_secs": 25
  }
}

Update a Call Control ApplicationUpdateCallControlApplication

patch https://api.telnyx.com/v2/call_control_applications/{id}

Updates settings of an existing Call Control application.

curl -X PATCH \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --data '{"active":false,"anchorsite_override":"Amsterdam, Netherlands"}' \
  https://api.telnyx.com/v2/call_control_applications/1293384261075731499
Parameters
In path
id
string (int64)
required

Identifies the resource.

Example: "1293384261075731499"
In body
application_name
string
required

A user-assigned name to help manage the application.

Example: "call-router"
webhook_event_url
string (url)
required

The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.

Example: "https://example.com"
active
boolean
optional

Specifies whether the connection can be used.

Default: true
anchorsite_override
string
optional

`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.

Default: "Latency"
Example: "Amsterdam, Netherlands"
Options: [ "Latency", "Chicago, IL", "Ashburn, VA", "San Jose, CA", "Sydney, Australia", "Amsterdam, Netherlands", "London, UK", "Toronto, Canada", "Vancouver, Canada", "Frankfurt, Germany" ]
dtmf_type
string
optional

Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF digits sent to Telnyx will be accepted in all formats.

Default: "RFC 2833"
Example: "Inband"
Options: [ "RFC 2833", "Inband", "SIP INFO" ]
first_command_timeout
boolean
optional

Specifies whether calls to phone numbers associated with this connection should hangup after timing out.

Default: false
Example: true
first_command_timeout_secs
integer
optional

Specifies how many seconds to wait before timing out a dial command.

Default: 30
Example: 10
inbound
object
optional
outbound
object
optional
webhook_api_version
string
optional

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

Default: "1"
Example: "1"
Options: [ "1", "2" ]
webhook_event_failover_url
string (url)
optional

The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.

Default: ""
Example: "https://failover.example.com"
webhook_timeout_secs
integer (0 - 30)
optional

Specifies how many seconds to wait before timing out a webhook.

Default: null
Example: 25
Responses
200

Successful response

401

Unauthorized

404

Resource not found

422

Bad request

Success Response
{
  "data": {
    "active": false,
    "anchorsite_override": "Amsterdam, Netherlands",
    "application_name": "call-router",
    "created_at": "2018-02-02T22:25:27.521Z",
    "dtmf_type": "Inband",
    "first_command_timeout": true,
    "first_command_timeout_secs": 10,
    "id": "1293384261075731499",
    "inbound": {
      "channel_limit": 10,
      "sip_subdomain": "example",
      "sip_subdomain_receive_settings": "only_my_connections"
    },
    "outbound": {
      "channel_limit": 10,
      "outbound_voice_profile_id": "1293384261075731499"
    },
    "record_type": "call_control_application",
    "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",
    "webhook_timeout_secs": 25
  }
}

Deletes a Call Control ApplicationDeleteCallControlApplication

delete https://api.telnyx.com/v2/call_control_applications/{id}

Deletes a Call Control application.

curl -X DELETE \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  "https://api.telnyx.com/v2/call_control_applications/1293384261075731499"
Parameters
In path
id
string (int64)
required

Identifies the resource.

Example: "1293384261075731499"
Responses
200

Successful response

401

Unauthorized

404

Resource not found

422

Bad request

Success Response
{
  "data": {
    "active": false,
    "anchorsite_override": "Amsterdam, Netherlands",
    "application_name": "call-router",
    "created_at": "2018-02-02T22:25:27.521Z",
    "dtmf_type": "Inband",
    "first_command_timeout": true,
    "first_command_timeout_secs": 10,
    "id": "1293384261075731499",
    "inbound": {
      "channel_limit": 10,
      "sip_subdomain": "example",
      "sip_subdomain_receive_settings": "only_my_connections"
    },
    "outbound": {
      "channel_limit": 10,
      "outbound_voice_profile_id": "1293384261075731499"
    },
    "record_type": "call_control_application",
    "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",
    "webhook_timeout_secs": 25
  }
}
Previous: Overview

Was this section helpful?was-this-page-helpful