Update an External Connection
Updates settings of an existing External Connection based on the parameters of the request.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const externalConnection = await client.externalConnections.update('1293384261075731499', {
outbound: { outbound_voice_profile_id: '1911630617284445511' },
});
console.log(externalConnection.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
external_connection = client.external_connections.update(
id="1293384261075731499",
outbound={
"outbound_voice_profile_id": "1911630617284445511"
},
)
print(external_connection.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
externalConnection, err := client.ExternalConnections.Update(
context.TODO(),
"1293384261075731499",
telnyx.ExternalConnectionUpdateParams{
Outbound: telnyx.ExternalConnectionUpdateParamsOutbound{
OutboundVoiceProfileID: "1911630617284445511",
},
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", externalConnection.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.externalconnections.ExternalConnectionUpdateParams;
import com.telnyx.sdk.models.externalconnections.ExternalConnectionUpdateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ExternalConnectionUpdateParams params = ExternalConnectionUpdateParams.builder()
.id("1293384261075731499")
.outbound(ExternalConnectionUpdateParams.Outbound.builder()
.outboundVoiceProfileId("1911630617284445511")
.build())
.build();
ExternalConnectionUpdateResponse externalConnection = client.externalConnections().update(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
external_connection = telnyx.external_connections.update(
"1293384261075731499",
outbound: {outbound_voice_profile_id: "1911630617284445511"}
)
puts(external_connection)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$externalConnection = $client->externalConnections->update(
'1293384261075731499',
outbound: [
'outboundVoiceProfileID' => '1911630617284445511', 'channelLimit' => 10
],
active: false,
inbound: ['channelLimit' => 10],
tags: ['tag1', 'tag2'],
webhookEventFailoverURL: 'https://failover.example.com',
webhookEventURL: 'https://example.com',
webhookTimeoutSecs: 25,
);
var_dump($externalConnection);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx external-connections update \
--api-key 'My API Key' \
--id 1293384261075731499 \
--outbound "{outbound_voice_profile_id: '1911630617284445511'}"curl --request PATCH \
--url https://api.telnyx.com/v2/external_connections/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"active": false,
"outbound": {
"outbound_voice_profile_id": "1911630617284445511"
}
}
'{
"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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifies the resource.
"1293384261075731499"
Body
Parameters to be updated for the External Connection
Show child attributes
Show child attributes
Specifies whether the connection can be used.
false
The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.
"https://example.com"
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'.
"https://failover.example.com"
Tags associated with the connection.
["tag1", "tag2"]
Specifies how many seconds to wait before timing out a webhook.
0 <= x <= 3025
Show child attributes
Show child attributes
Response
Successful response
Show child attributes
Show child attributes
{
"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"
}
}
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const externalConnection = await client.externalConnections.update('1293384261075731499', {
outbound: { outbound_voice_profile_id: '1911630617284445511' },
});
console.log(externalConnection.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
external_connection = client.external_connections.update(
id="1293384261075731499",
outbound={
"outbound_voice_profile_id": "1911630617284445511"
},
)
print(external_connection.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
externalConnection, err := client.ExternalConnections.Update(
context.TODO(),
"1293384261075731499",
telnyx.ExternalConnectionUpdateParams{
Outbound: telnyx.ExternalConnectionUpdateParamsOutbound{
OutboundVoiceProfileID: "1911630617284445511",
},
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", externalConnection.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.externalconnections.ExternalConnectionUpdateParams;
import com.telnyx.sdk.models.externalconnections.ExternalConnectionUpdateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ExternalConnectionUpdateParams params = ExternalConnectionUpdateParams.builder()
.id("1293384261075731499")
.outbound(ExternalConnectionUpdateParams.Outbound.builder()
.outboundVoiceProfileId("1911630617284445511")
.build())
.build();
ExternalConnectionUpdateResponse externalConnection = client.externalConnections().update(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
external_connection = telnyx.external_connections.update(
"1293384261075731499",
outbound: {outbound_voice_profile_id: "1911630617284445511"}
)
puts(external_connection)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$externalConnection = $client->externalConnections->update(
'1293384261075731499',
outbound: [
'outboundVoiceProfileID' => '1911630617284445511', 'channelLimit' => 10
],
active: false,
inbound: ['channelLimit' => 10],
tags: ['tag1', 'tag2'],
webhookEventFailoverURL: 'https://failover.example.com',
webhookEventURL: 'https://example.com',
webhookTimeoutSecs: 25,
);
var_dump($externalConnection);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx external-connections update \
--api-key 'My API Key' \
--id 1293384261075731499 \
--outbound "{outbound_voice_profile_id: '1911630617284445511'}"curl --request PATCH \
--url https://api.telnyx.com/v2/external_connections/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"active": false,
"outbound": {
"outbound_voice_profile_id": "1911630617284445511"
}
}
'{
"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"
}
}
}