import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const externalConnection = await client.externalConnections.create({
external_sip_connection: 'zoom',
outbound: {},
});
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"
}
}
}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: 'My API Key',
});
const externalConnection = await client.externalConnections.create({
external_sip_connection: 'zoom',
outbound: {},
});
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"
}
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Parameters that can be set when creating a External Connection
The service that will be consuming this connection.
zoom "zoom"
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
The ID of the outbound voice profile to use for inbound calls.
"12345678-1234-1234-1234-123456789012"
When set, this will limit the number of concurrent inbound calls to phone numbers associated with this connection.
10
Successful response
Show child attributes
Uniquely identifies the resource.
"1293384261075731499"
Identifies the type of the resource.
"external_connection"
Specifies whether the connection can be used.
false
If the credential associated with this service is active.
true
The service that will be consuming this connection.
zoom, operator_connect "zoom"
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"
Determines which webhook format will be used, Telnyx API v1 or v2.
1, 2 "1"
Specifies how many seconds to wait before timing out a webhook.
0 <= x <= 3025
Show child attributes
ISO 8601 formatted date indicating when the resource was created.
"2018-02-02T22:25:27.521Z"
ISO 8601 formatted date indicating when the resource was updated.
"2018-02-02T22:25:27.521Z"
{
"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?