Create an outbound voice profile
POST/outbound_voice_profiles
Create an outbound voice profile.
Request
- application/json
Body
required
Parameters that can be defined when creating an outbound voice profile
Possible values: >= 3 characters
A user-supplied name to help with organization.
Possible values: [conversational
]
Default value: conversational
Specifies the type of traffic allowed in this profile.
Possible values: [global
]
Default value: global
Indicates the coverage of the termination regions.
Must be no more than your global concurrent call limit. Null means no limit.
Default value: true
Specifies whether the outbound voice profile can be used. Disabled profiles will result in outbound calls being blocked for the associated Connections.
Possible values: [rate-deck
]
Default value: rate-deck
Setting for how costs for outbound profile are calculated.
Default value: US,CA
The list of destinations you want to be able to call using this outbound voice profile formatted in alpha2.
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.
Specifies whether to enforce the daily_spend_limit on this outbound voice profile.
call_recording
object
Possible values: [all
, none
, by_caller_phone_number
]
Specifies which calls are recorded.
When call_recording_type is 'by_caller_phone_number', only outbound calls using one of these numbers will be recorded. Numbers must be specified in E164 format.
Possible values: [single
, dual
]
Default value: single
When using 'dual' channels, the final audio file will be a stereo recording with the first leg on channel A, and the rest on channel B.
Possible values: [wav
, mp3
]
Default value: wav
The audio file format for calls being recorded.
The ID of the billing group associated with the outbound proflile. Defaults to null (for no group assigned).
Responses
200: Successful response
- application/json
401: Unauthorized
404: Resource not found
422: Bad request
Request samples
curl -L 'https://api.telnyx.com/v2/outbound_voice_profiles' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"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"
}'
Response samples
{
"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",
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
}