Skip to main content
PATCH
/
outbound_voice_profiles
/
{id}
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const outboundVoiceProfile = await client.outboundVoiceProfiles.update('1293384261075731499', {
  name: 'office',
});

console.log(outboundVoiceProfile.data);
{
  "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",
      "end_time": "20:00:00",
      "calls_per_cld": 5
    },
    "created_at": "2018-02-02T22:25:27.521Z",
    "updated_at": "2018-02-02T22:25:27.521Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Identifies the resource.

Example:

"1293384261075731499"

Body

application/json

Parameters that can be updated on an outbound voice profile

name
string
required

A user-supplied name to help with organization.

Minimum length: 3
Example:

"office"

traffic_type
enum<string>
default:conversational

Specifies the type of traffic allowed in this profile.

Available options:
conversational
Example:

"conversational"

service_plan
enum<string>
default:global

Indicates the coverage of the termination regions.

Available options:
global
Example:

"global"

concurrent_call_limit
integer | null

Must be no more than your global concurrent call limit. Null means no limit.

Example:

10

enabled
boolean
default:true

Specifies whether the outbound voice profile can be used. Disabled profiles will result in outbound calls being blocked for the associated Connections.

Example:

true

tags
string[]
Example:
["office-profile"]
usage_payment_method
enum<string>
default:rate-deck

Setting for how costs for outbound profile are calculated.

Available options:
rate-deck
Example:

"rate-deck"

whitelisted_destinations
string[]

The list of destinations you want to be able to call using this outbound voice profile formatted in alpha2.

Example:
["US", "BR", "AU"]
max_destination_rate
number

Maximum rate (price per minute) for a Destination to be allowed when making outbound calls.

daily_spend_limit
string

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.

Example:

"100.00"

daily_spend_limit_enabled
boolean
default:false

Specifies whether to enforce the daily_spend_limit on this outbound voice profile.

Example:

true

call_recording
object
Example:
{
"call_recording_type": "by_caller_phone_number",
"call_recording_caller_phone_numbers": ["+19705555098"],
"call_recording_channels": "dual",
"call_recording_format": "mp3"
}
billing_group_id
string<uuid> | null

The ID of the billing group associated with the outbound proflile. Defaults to null (for no group assigned).

Example:

"6a09cdc3-8948-47f0-aa62-74ac943d6c58"

calling_window
object

(BETA) Specifies the time window and call limits for calls made using this outbound voice profile.

Example:
{
"start_time": "08:00:00",
"end_time": "20:00:00",
"calls_per_cld": 5
}

Response

Successful response

data
object
Example:
{
"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",
"end_time": "20:00:00",
"calls_per_cld": 5
},
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}