Update a Mobile Voice Connection
Update the settings of a specific mobile voice connection.
PATCH
/
v2
/
mobile_voice_connections
/
{id}
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const mobileVoiceConnection = await client.mobileVoiceConnections.update('id');
console.log(mobileVoiceConnection.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
)
mobile_voice_connection = client.mobile_voice_connections.update(
id="id",
)
print(mobile_voice_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"),
)
mobileVoiceConnection, err := client.MobileVoiceConnections.Update(
context.TODO(),
"id",
telnyx.MobileVoiceConnectionUpdateParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", mobileVoiceConnection.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.mobilevoiceconnections.MobileVoiceConnectionUpdateParams;
import com.telnyx.sdk.models.mobilevoiceconnections.MobileVoiceConnectionUpdateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
MobileVoiceConnectionUpdateResponse mobileVoiceConnection = client.mobileVoiceConnections().update("id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
mobile_voice_connection = telnyx.mobile_voice_connections.update("id")
puts(mobile_voice_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 {
$mobileVoiceConnection = $client->mobileVoiceConnections->update(
'id',
active: true,
connectionName: 'connection_name',
inbound: ['channelLimit' => 0],
outbound: [
'channelLimit' => 0,
'outboundVoiceProfileID' => 'outbound_voice_profile_id',
],
tags: ['string'],
webhookAPIVersion: '1',
webhookEventFailoverURL: 'webhook_event_failover_url',
webhookEventURL: 'webhook_event_url',
webhookTimeoutSecs: 0,
);
var_dump($mobileVoiceConnection);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx mobile-voice-connections update \
--api-key 'My API Key' \
--id idcurl --request PATCH \
--url https://api.telnyx.com/v2/mobile_voice_connections/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"active": false,
"connection_name": "string",
"webhook_api_version": "1",
"webhook_timeout_secs": 0,
"tags": [
"string"
],
"outbound": {
"channel_limit": 0,
"outbound_voice_profile_id": "string"
},
"inbound": {
"channel_limit": 0
}
}
'{
"data": {
"id": "<string>",
"record_type": "mobile_voice_connection",
"active": true,
"connection_name": "<string>",
"tags": [
"<string>"
],
"webhook_event_url": "<string>",
"webhook_event_failover_url": "<string>",
"webhook_timeout_secs": 123,
"outbound": {
"channel_limit": 123,
"outbound_voice_profile_id": "<string>"
},
"inbound": {
"channel_limit": 123
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the mobile voice connection
Body
application/json
Response
Successful response
Show child attributes
Show child attributes
Was this page helpful?
⌘I
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const mobileVoiceConnection = await client.mobileVoiceConnections.update('id');
console.log(mobileVoiceConnection.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
)
mobile_voice_connection = client.mobile_voice_connections.update(
id="id",
)
print(mobile_voice_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"),
)
mobileVoiceConnection, err := client.MobileVoiceConnections.Update(
context.TODO(),
"id",
telnyx.MobileVoiceConnectionUpdateParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", mobileVoiceConnection.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.mobilevoiceconnections.MobileVoiceConnectionUpdateParams;
import com.telnyx.sdk.models.mobilevoiceconnections.MobileVoiceConnectionUpdateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
MobileVoiceConnectionUpdateResponse mobileVoiceConnection = client.mobileVoiceConnections().update("id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
mobile_voice_connection = telnyx.mobile_voice_connections.update("id")
puts(mobile_voice_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 {
$mobileVoiceConnection = $client->mobileVoiceConnections->update(
'id',
active: true,
connectionName: 'connection_name',
inbound: ['channelLimit' => 0],
outbound: [
'channelLimit' => 0,
'outboundVoiceProfileID' => 'outbound_voice_profile_id',
],
tags: ['string'],
webhookAPIVersion: '1',
webhookEventFailoverURL: 'webhook_event_failover_url',
webhookEventURL: 'webhook_event_url',
webhookTimeoutSecs: 0,
);
var_dump($mobileVoiceConnection);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx mobile-voice-connections update \
--api-key 'My API Key' \
--id idcurl --request PATCH \
--url https://api.telnyx.com/v2/mobile_voice_connections/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"active": false,
"connection_name": "string",
"webhook_api_version": "1",
"webhook_timeout_secs": 0,
"tags": [
"string"
],
"outbound": {
"channel_limit": 0,
"outbound_voice_profile_id": "string"
},
"inbound": {
"channel_limit": 0
}
}
'{
"data": {
"id": "<string>",
"record_type": "mobile_voice_connection",
"active": true,
"connection_name": "<string>",
"tags": [
"<string>"
],
"webhook_event_url": "<string>",
"webhook_event_failover_url": "<string>",
"webhook_timeout_secs": 123,
"outbound": {
"channel_limit": 123,
"outbound_voice_profile_id": "<string>"
},
"inbound": {
"channel_limit": 123
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}