Creates an External Connection
Creates a new External Connection based on the parameters sent in the request. The external_sip_connection and outbound voice profile id are required. Once created, you can assign phone numbers to your application using the /phone_numbers endpoint.
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.create({
external_sip_connection: 'zoom',
outbound: {},
});
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.create(
external_sip_connection="zoom",
outbound={},
)
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.New(context.TODO(), telnyx.ExternalConnectionNewParams{
ExternalSipConnection: telnyx.ExternalConnectionNewParamsExternalSipConnectionZoom,
Outbound: telnyx.ExternalConnectionNewParamsOutbound{},
})
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.ExternalConnectionCreateParams;
import com.telnyx.sdk.models.externalconnections.ExternalConnectionCreateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ExternalConnectionCreateParams params = ExternalConnectionCreateParams.builder()
.externalSipConnection(ExternalConnectionCreateParams.ExternalSipConnection.ZOOM)
.outbound(ExternalConnectionCreateParams.Outbound.builder().build())
.build();
ExternalConnectionCreateResponse externalConnection = client.externalConnections().create(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
external_connection = telnyx.external_connections.create(external_sip_connection: :zoom, outbound: {})
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->create(
externalSipConnection: 'zoom',
outbound: [
'channelLimit' => 10, 'outboundVoiceProfileID' => '1911630617284445511'
],
active: false,
inbound: [
'outboundVoiceProfileID' => '12345678-1234-1234-1234-123456789012',
'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 create \
--api-key 'My API Key' \
--external-sip-connection zoom \
--outbound '{}'curl --request POST \
--url https://api.telnyx.com/v2/external_connections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_sip_connection": "zoom",
"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.
Body
Parameters that can be set when creating a External Connection
The service that will be consuming this connection.
zoom "zoom"
Show child attributes
Show child attributes
Specifies whether the connection can be used.
false
Tags associated with the connection.
["tag1", "tag2"]
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"
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.create({
external_sip_connection: 'zoom',
outbound: {},
});
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.create(
external_sip_connection="zoom",
outbound={},
)
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.New(context.TODO(), telnyx.ExternalConnectionNewParams{
ExternalSipConnection: telnyx.ExternalConnectionNewParamsExternalSipConnectionZoom,
Outbound: telnyx.ExternalConnectionNewParamsOutbound{},
})
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.ExternalConnectionCreateParams;
import com.telnyx.sdk.models.externalconnections.ExternalConnectionCreateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ExternalConnectionCreateParams params = ExternalConnectionCreateParams.builder()
.externalSipConnection(ExternalConnectionCreateParams.ExternalSipConnection.ZOOM)
.outbound(ExternalConnectionCreateParams.Outbound.builder().build())
.build();
ExternalConnectionCreateResponse externalConnection = client.externalConnections().create(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
external_connection = telnyx.external_connections.create(external_sip_connection: :zoom, outbound: {})
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->create(
externalSipConnection: 'zoom',
outbound: [
'channelLimit' => 10, 'outboundVoiceProfileID' => '1911630617284445511'
],
active: false,
inbound: [
'outboundVoiceProfileID' => '12345678-1234-1234-1234-123456789012',
'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 create \
--api-key 'My API Key' \
--external-sip-connection zoom \
--outbound '{}'curl --request POST \
--url https://api.telnyx.com/v2/external_connections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_sip_connection": "zoom",
"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"
}
}
}