Delete a Mobile Voice Connection
Delete a mobile voice connection from your account.
DELETE
/
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.delete('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.delete(
"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.Delete(context.TODO(), "id")
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.MobileVoiceConnectionDeleteParams;
import com.telnyx.sdk.models.mobilevoiceconnections.MobileVoiceConnectionDeleteResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
MobileVoiceConnectionDeleteResponse mobileVoiceConnection = client.mobileVoiceConnections().delete("id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
mobile_voice_connection = telnyx.mobile_voice_connections.delete("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->delete('id');
var_dump($mobileVoiceConnection);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx mobile-voice-connections delete \
--api-key 'My API Key' \
--id idcurl --request DELETE \
--url https://api.telnyx.com/v2/mobile_voice_connections/{id} \
--header 'Authorization: Bearer <token>'{
"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"
}
}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.delete('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.delete(
"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.Delete(context.TODO(), "id")
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.MobileVoiceConnectionDeleteParams;
import com.telnyx.sdk.models.mobilevoiceconnections.MobileVoiceConnectionDeleteResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
MobileVoiceConnectionDeleteResponse mobileVoiceConnection = client.mobileVoiceConnections().delete("id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
mobile_voice_connection = telnyx.mobile_voice_connections.delete("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->delete('id');
var_dump($mobileVoiceConnection);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx mobile-voice-connections delete \
--api-key 'My API Key' \
--id idcurl --request DELETE \
--url https://api.telnyx.com/v2/mobile_voice_connections/{id} \
--header 'Authorization: Bearer <token>'{
"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"
}
}