Skip to main content
PATCH
/
external_connections
/
{id}
JavaScript
import Telnyx from 'telnyx';

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

const externalConnection = await client.externalConnections.update('id', {
  outbound: { outbound_voice_profile_id: 'outbound_voice_profile_id' },
});

console.log(externalConnection.data);
{
  "data": {
    "id": "1930241863466354012",
    "record_type": "external_connection",
    "external_sip_connection": "zoom",
    "credential_active": false,
    "active": false,
    "created_at": "2022-06-29T19:23:59Z",
    "updated_at": "2022-06-29T19:39:47Z",
    "outbound": {
      "outbound_voice_profile_id": "1911630617284445511"
    }
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string<int64>
required

Identifies the resource.

Example:

"1293384261075731499"

Body

application/json

Parameters to be updated for the External Connection

outbound
object
required
active
boolean
default:true

Specifies whether the connection can be used.

Example:

false

webhook_event_url
string<uri>

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

Example:

"https://example.com"

webhook_event_failover_url
string<uri> | null
default:""

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

Example:

"https://failover.example.com"

tags
string[]

Tags associated with the connection.

Example:
["tag1", "tag2"]
webhook_timeout_secs
integer | null

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

Required range: 0 <= x <= 30
Example:

25

inbound
object

Response

Successful response

data
External Connection · object
Example:
{
"id": "1930241863466354012",
"record_type": "external_connection",
"external_sip_connection": "zoom",
"credential_active": false,
"active": false,
"created_at": "2022-06-29T19:23:59Z",
"updated_at": "2022-06-29T19:39:47Z",
"outbound": {
"outbound_voice_profile_id": "1911630617284445511"
}
}