Voice Settings
This API lets you view and manage the account settings of your Zendesk voice account. See Enabling Talk and configuring general settings in Zendesk help.
JSON format
Voice Settings are represented as JSON objects with the following properties:
Name | Type | Read-only | Mandatory | Description |
---|---|---|---|---|
agent_confirmation_when_forwarding | boolean | false | false | When true, agents must press a key to answer calls forwarded to their phones. This prevents calls from forwarding to an agent's personal voicemail if they do not take the call |
agent_wrap_up_after_calls | boolean | true | false | Legacy setting, now controlled for most accounts on a per-number basis. When true, talk agents have time after each call to finish adding details to the ticket |
maximum_queue_size | integer | false | false | New calls that exceed this limit are directed to voicemail. Allowed values are 0, 2, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50. |
maximum_queue_wait_time | integer | false | false | Callers who wait longer than this limit are directed to voicemail. Allowed values are 1, 2, 5, 10, 15, 20, 25, 30. |
only_during_business_hours | boolean | false | false | Legacy setting, now controlled for most accounts on a per-number basis. When true, calls will be routed to available agents based on the business hours defined in your Support schedule |
recordings_public | boolean | false | false | When true, allows the requester to see recordings from live calls that are added to tickets |
supported_locales | array | true | false | List of translation locales supported for the account |
voice | boolean | false | false | When true, allows agents to make themselves available to answer calls. Your phone number can still accept voicemails when set to false |
voice_ai_display_transcript | boolean | false | false | If true, displays call transcription relating to a call recording on a voice ticket (if turned on for a given line) |
voice_ai_enabled | boolean | false | false | If true, displays call transcription relating to a call recording on tickets (if turned on for a given line) |
voice_ai_enabled_lines | array | false | false | List of phone number ids that have voice AI enabled |
voice_zendesk_qa_enabled | boolean | false | false | If true, enables access to Zendesk QA feature to a call (if turned on for a given line) |
voice_zendesk_qa_enabled_lines | array | false | false | List of phone number ids that have voice Zendesk QA enabled |
Show Voice Settings
GET /api/v2/channels/voice/settings
Allowed For
- Agents
Code Samples
curl
curl -X GET https://{subdomain}.zendesk.com/api/v2/channels/voice/settings.json
-v -u {email_address}/token:{api_token}
Go
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://support.zendesk.com/api/v2/channels/voice/settings"
method := "GET"
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "{email_address}/token:{api_token}"
client := &http.Client {}
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Java
import com.squareup.okhttp.*;
OkHttpClient client = new OkHttpClient();
HttpUrl.Builder urlBuilder = HttpUrl.parse("https://support.zendesk.com/api/v2/channels/voice/settings")
.newBuilder();
String userCredentials = "your_email_address" + "/token:" + "your_api_token";
String basicAuth = "Basic " + java.util.Base64.getEncoder().encodeToString(userCredentials.getBytes());
Request request = new Request.Builder()
.url(urlBuilder.build())
.method("GET", null)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", basicAuth)
.build();
Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');
var config = {
method: 'GET',
url: 'https://support.zendesk.com/api/v2/channels/voice/settings',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic <auth-value>', // Base64 encoded "{email_address}/token:{api_token}"
},
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Python
import requests
from requests.auth import HTTPBasicAuth
url = "https://support.zendesk.com/api/v2/channels/voice/settings"
headers = {
"Content-Type": "application/json",
}
email_address = 'your_email_address'
api_token = 'your_api_token'
# Use basic authentication
auth = HTTPBasicAuth(f'{email_address}/token', api_token)
response = requests.request(
"GET",
url,
auth=auth,
headers=headers
)
print(response.text)
Ruby
require "net/http"
require "base64"
uri = URI("https://support.zendesk.com/api/v2/channels/voice/settings")
request = Net::HTTP::Get.new(uri, "Content-Type": "application/json")
email = "your_email_address"
api_token = "your_api_token"
credentials = "#{email}/token:#{api_token}"
encoded_credentials = Base64.strict_encode64(credentials)
request["Authorization"] = "Basic #{encoded_credentials}"
response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|
http.request(request)
end
Example response(s)
200 OK
// Status 200 OK
{
"settings": {
"agent_confirmation_when_forwarding": true,
"agent_wrap_up_after_calls": true,
"maximum_queue_size": 10,
"maximum_queue_wait_time": 2,
"only_during_business_hours": false,
"recordings_public": true,
"supported_locales": [
{
"id": "da",
"name": "Danish - dansk"
},
{
"id": "de",
"name": "German - Deutsch"
},
{
"id": "en-US",
"name": "English"
},
"...."
],
"voice": false,
"voice_ai_display_transcript": false,
"voice_ai_enabled": false,
"voice_ai_enabled_lines": [],
"voice_zendesk_qa_enabled": false,
"voice_zendesk_qa_enabled_lines": []
}
}
Update Voice Settings
PUT /api/v2/channels/voice/settings
Allowed For
- Agents
Example body
{
"settings": {
"voice": false
}
}
Code Samples
curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/settings.json \
-H "Content-Type: application/json" -d '{"settings": {"voice": false }}' \
-u {email}/token:{token} -X PUT
Go
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
url := "https://support.zendesk.com/api/v2/channels/voice/settings"
method := "PUT"
payload := strings.NewReader(`{
"settings": {
"voice": false
}
}`)
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "{email_address}/token:{api_token}"
client := &http.Client {}
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Java
import com.squareup.okhttp.*;
OkHttpClient client = new OkHttpClient();
HttpUrl.Builder urlBuilder = HttpUrl.parse("https://support.zendesk.com/api/v2/channels/voice/settings")
.newBuilder();
RequestBody body = RequestBody.create(MediaType.parse("application/json"),
"""
{
\"settings\": {
\"voice\": false
}
}""");
String userCredentials = "your_email_address" + "/token:" + "your_api_token";
String basicAuth = "Basic " + java.util.Base64.getEncoder().encodeToString(userCredentials.getBytes());
Request request = new Request.Builder()
.url(urlBuilder.build())
.method("PUT", body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", basicAuth)
.build();
Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');
var data = JSON.stringify({
"settings": {
"voice": false
}
});
var config = {
method: 'PUT',
url: 'https://support.zendesk.com/api/v2/channels/voice/settings',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic <auth-value>', // Base64 encoded "{email_address}/token:{api_token}"
},
data : data,
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Python
import requests
import json
from requests.auth import HTTPBasicAuth
url = "https://support.zendesk.com/api/v2/channels/voice/settings"
payload = json.loads("""{
"settings": {
"voice": false
}
}""")
headers = {
"Content-Type": "application/json",
}
email_address = 'your_email_address'
api_token = 'your_api_token'
# Use basic authentication
auth = HTTPBasicAuth(f'{email_address}/token', api_token)
response = requests.request(
"PUT",
url,
auth=auth,
headers=headers,
json=payload
)
print(response.text)
Ruby
require "net/http"
require "base64"
uri = URI("https://support.zendesk.com/api/v2/channels/voice/settings")
request = Net::HTTP::Put.new(uri, "Content-Type": "application/json")
request.body = %q({
"settings": {
"voice": false
}
})
email = "your_email_address"
api_token = "your_api_token"
credentials = "#{email}/token:#{api_token}"
encoded_credentials = Base64.strict_encode64(credentials)
request["Authorization"] = "Basic #{encoded_credentials}"
response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|
http.request(request)
end
Example response(s)
200 OK
// Status 200 OK
{
"settings": {
"agent_confirmation_when_forwarding": true,
"agent_wrap_up_after_calls": true,
"maximum_queue_size": 10,
"maximum_queue_wait_time": 2,
"only_during_business_hours": false,
"recordings_public": true,
"supported_locales": [
{
"id": "da",
"name": "Danish - dansk"
},
{
"id": "de",
"name": "German - Deutsch"
},
{
"id": "en-US",
"name": "English"
},
"...."
],
"voice": false,
"voice_ai_display_transcript": false,
"voice_ai_enabled": false,
"voice_ai_enabled_lines": [],
"voice_zendesk_qa_enabled": false,
"voice_zendesk_qa_enabled_lines": []
}
}