Updates an existing outbound voice profile.
Updates an existing outbound voice profile.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const outboundVoiceProfile = await client.outboundVoiceProfiles.update('1293384261075731499', {
name: 'office',
});
console.log(outboundVoiceProfile.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
)
outbound_voice_profile = client.outbound_voice_profiles.update(
id="1293384261075731499",
name="office",
)
print(outbound_voice_profile.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"),
)
outboundVoiceProfile, err := client.OutboundVoiceProfiles.Update(
context.TODO(),
"1293384261075731499",
telnyx.OutboundVoiceProfileUpdateParams{
Name: "office",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", outboundVoiceProfile.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.outboundvoiceprofiles.OutboundVoiceProfileUpdateParams;
import com.telnyx.sdk.models.outboundvoiceprofiles.OutboundVoiceProfileUpdateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
OutboundVoiceProfileUpdateParams params = OutboundVoiceProfileUpdateParams.builder()
.id("1293384261075731499")
.name("office")
.build();
OutboundVoiceProfileUpdateResponse outboundVoiceProfile = client.outboundVoiceProfiles().update(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
outbound_voice_profile = telnyx.outbound_voice_profiles.update("1293384261075731499", name: "office")
puts(outbound_voice_profile)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
use Telnyx\OutboundVoiceProfiles\ServicePlan;
use Telnyx\OutboundVoiceProfiles\TrafficType;
use Telnyx\OutboundVoiceProfiles\UsagePaymentMethod;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$outboundVoiceProfile = $client->outboundVoiceProfiles->update(
'1293384261075731499',
name: 'office',
billingGroupID: '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
callRecording: [
'callRecordingCallerPhoneNumbers' => ['+19705555098'],
'callRecordingChannels' => 'dual',
'callRecordingFormat' => 'mp3',
'callRecordingType' => 'by_caller_phone_number',
],
callingWindow: [
'callsPerCld' => 5,
'endTime' => '20:00:00.00Z',
'startTime' => '08:00:00.00Z',
],
concurrentCallLimit: 10,
dailySpendLimit: '100.00',
dailySpendLimitEnabled: true,
enabled: true,
maxDestinationRate: 10,
servicePlan: ServicePlan::GLOBAL,
tags: ['office-profile'],
trafficType: TrafficType::CONVERSATIONAL,
usagePaymentMethod: UsagePaymentMethod::RATE_DECK,
whitelistedDestinations: ['US', 'BR', 'AU'],
);
var_dump($outboundVoiceProfile);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx outbound-voice-profiles update \
--api-key 'My API Key' \
--id 1293384261075731499 \
--name officecurl --request PATCH \
--url https://api.telnyx.com/v2/outbound_voice_profiles/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "office",
"traffic_type": "conversational",
"service_plan": "global",
"concurrent_call_limit": 10,
"enabled": true,
"tags": [
"office-profile"
],
"usage_payment_method": "rate-deck",
"whitelisted_destinations": [
"US",
"BR",
"AU"
],
"max_destination_rate": 10,
"daily_spend_limit": "100.00",
"daily_spend_limit_enabled": true,
"billing_group_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"calling_window": {
"start_time": "08:00:00.00Z",
"end_time": "20:00:00.00Z",
"calls_per_cld": 5
}
}
'{
"data": {
"id": "1293384261075731499",
"record_type": "outbound_voice_profile",
"name": "office",
"connections_count": 12,
"traffic_type": "conversational",
"service_plan": "global",
"concurrent_call_limit": 10,
"enabled": true,
"tags": [
"office-profile"
],
"usage_payment_method": "rate-deck",
"whitelisted_destinations": [
"US",
"BR",
"AU"
],
"max_destination_rate": 10,
"daily_spend_limit": "100.00",
"daily_spend_limit_enabled": true,
"call_recording": {
"call_recording_type": "by_caller_phone_number",
"call_recording_caller_phone_numbers": [
"+19705555098"
],
"call_recording_channels": "dual",
"call_recording_format": "mp3"
},
"billing_group_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"calling_window": {
"start_time": "08:00:00.00Z",
"end_time": "20:00:00.00Z",
"calls_per_cld": 5
},
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
}{
"errors": [
{
"detail": "A previous update to this outbound voice profile is still in progress. Please try again later."
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifies the resource.
"1293384261075731499"
Body
Parameters that can be updated on an outbound voice profile
A user-supplied name to help with organization.
3"office"
Specifies the type of traffic allowed in this profile.
conversational "conversational"
Indicates the coverage of the termination regions.
global "global"
Must be no more than your global concurrent call limit. Null means no limit.
10
Specifies whether the outbound voice profile can be used. Disabled profiles will result in outbound calls being blocked for the associated Connections.
true
["office-profile"]
Setting for how costs for outbound profile are calculated.
rate-deck "rate-deck"
The list of destinations you want to be able to call using this outbound voice profile formatted in alpha2.
["US", "BR", "AU"]
Maximum rate (price per minute) for a Destination to be allowed when making outbound calls.
The maximum amount of usage charges, in USD, you want Telnyx to allow on this outbound voice profile in a day before disallowing new calls.
"100.00"
Specifies whether to enforce the daily_spend_limit on this outbound voice profile.
true
Show child attributes
Show child attributes
{
"call_recording_type": "by_caller_phone_number",
"call_recording_caller_phone_numbers": ["+19705555098"],
"call_recording_channels": "dual",
"call_recording_format": "mp3"
}
The ID of the billing group associated with the outbound proflile. Defaults to null (for no group assigned).
"6a09cdc3-8948-47f0-aa62-74ac943d6c58"
Specifies the time window and call limits for calls made using this outbound voice profile.
Show child attributes
Show child attributes
{
"start_time": "08:00:00.00Z",
"end_time": "20:00:00.00Z",
"calls_per_cld": 5
}
Response
Successful response
Show child attributes
Show child attributes
{
"id": "1293384261075731499",
"record_type": "outbound_voice_profile",
"name": "office",
"connections_count": 12,
"traffic_type": "conversational",
"service_plan": "global",
"concurrent_call_limit": 10,
"enabled": true,
"tags": ["office-profile"],
"usage_payment_method": "rate-deck",
"whitelisted_destinations": ["US", "BR", "AU"],
"max_destination_rate": 10,
"daily_spend_limit": "100.00",
"daily_spend_limit_enabled": true,
"call_recording": {
"call_recording_type": "by_caller_phone_number",
"call_recording_caller_phone_numbers": ["+19705555098"],
"call_recording_channels": "dual",
"call_recording_format": "mp3"
},
"billing_group_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"calling_window": {
"start_time": "08:00:00.00Z",
"end_time": "20:00:00.00Z",
"calls_per_cld": 5
},
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
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 outboundVoiceProfile = await client.outboundVoiceProfiles.update('1293384261075731499', {
name: 'office',
});
console.log(outboundVoiceProfile.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
)
outbound_voice_profile = client.outbound_voice_profiles.update(
id="1293384261075731499",
name="office",
)
print(outbound_voice_profile.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"),
)
outboundVoiceProfile, err := client.OutboundVoiceProfiles.Update(
context.TODO(),
"1293384261075731499",
telnyx.OutboundVoiceProfileUpdateParams{
Name: "office",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", outboundVoiceProfile.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.outboundvoiceprofiles.OutboundVoiceProfileUpdateParams;
import com.telnyx.sdk.models.outboundvoiceprofiles.OutboundVoiceProfileUpdateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
OutboundVoiceProfileUpdateParams params = OutboundVoiceProfileUpdateParams.builder()
.id("1293384261075731499")
.name("office")
.build();
OutboundVoiceProfileUpdateResponse outboundVoiceProfile = client.outboundVoiceProfiles().update(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
outbound_voice_profile = telnyx.outbound_voice_profiles.update("1293384261075731499", name: "office")
puts(outbound_voice_profile)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
use Telnyx\OutboundVoiceProfiles\ServicePlan;
use Telnyx\OutboundVoiceProfiles\TrafficType;
use Telnyx\OutboundVoiceProfiles\UsagePaymentMethod;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$outboundVoiceProfile = $client->outboundVoiceProfiles->update(
'1293384261075731499',
name: 'office',
billingGroupID: '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
callRecording: [
'callRecordingCallerPhoneNumbers' => ['+19705555098'],
'callRecordingChannels' => 'dual',
'callRecordingFormat' => 'mp3',
'callRecordingType' => 'by_caller_phone_number',
],
callingWindow: [
'callsPerCld' => 5,
'endTime' => '20:00:00.00Z',
'startTime' => '08:00:00.00Z',
],
concurrentCallLimit: 10,
dailySpendLimit: '100.00',
dailySpendLimitEnabled: true,
enabled: true,
maxDestinationRate: 10,
servicePlan: ServicePlan::GLOBAL,
tags: ['office-profile'],
trafficType: TrafficType::CONVERSATIONAL,
usagePaymentMethod: UsagePaymentMethod::RATE_DECK,
whitelistedDestinations: ['US', 'BR', 'AU'],
);
var_dump($outboundVoiceProfile);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx outbound-voice-profiles update \
--api-key 'My API Key' \
--id 1293384261075731499 \
--name officecurl --request PATCH \
--url https://api.telnyx.com/v2/outbound_voice_profiles/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "office",
"traffic_type": "conversational",
"service_plan": "global",
"concurrent_call_limit": 10,
"enabled": true,
"tags": [
"office-profile"
],
"usage_payment_method": "rate-deck",
"whitelisted_destinations": [
"US",
"BR",
"AU"
],
"max_destination_rate": 10,
"daily_spend_limit": "100.00",
"daily_spend_limit_enabled": true,
"billing_group_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"calling_window": {
"start_time": "08:00:00.00Z",
"end_time": "20:00:00.00Z",
"calls_per_cld": 5
}
}
'{
"data": {
"id": "1293384261075731499",
"record_type": "outbound_voice_profile",
"name": "office",
"connections_count": 12,
"traffic_type": "conversational",
"service_plan": "global",
"concurrent_call_limit": 10,
"enabled": true,
"tags": [
"office-profile"
],
"usage_payment_method": "rate-deck",
"whitelisted_destinations": [
"US",
"BR",
"AU"
],
"max_destination_rate": 10,
"daily_spend_limit": "100.00",
"daily_spend_limit_enabled": true,
"call_recording": {
"call_recording_type": "by_caller_phone_number",
"call_recording_caller_phone_numbers": [
"+19705555098"
],
"call_recording_channels": "dual",
"call_recording_format": "mp3"
},
"billing_group_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"calling_window": {
"start_time": "08:00:00.00Z",
"end_time": "20:00:00.00Z",
"calls_per_cld": 5
},
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
}{
"errors": [
{
"detail": "A previous update to this outbound voice profile is still in progress. Please try again later."
}
]
}