This API lets you view and manage the account settings of your Zendesk voice account. SeeEnabling Talk and configuring general settingsin 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

Show Voice Settings

  • GET /api/v2/channels/voice/settings

Allowed For

  • Agents

Code Samples

旋度
              
旋度-X GET https://{subdomain}.zendesk.com/api/v2/channels/voice/settings.json-v -u{email_address}:{password}
Go
              
import("fmt""io""net/http")funcmain(){url:="https://support.zendesk.com/api/v2/channels/voice/settings"method:="GET"req,err:=http.NewRequest(method,url,nil)iferr!=nil{fmt.Println(err)return}req.Header.Add("Content-Type","application/json")req.Header.Add("Authorization","Basic ")// Base64 encoded "username:password"client:=&http.Client{}res,err:=client.Do(req)iferr!=nil{fmt.Println(err)return}deferres.Body.Close()body,err:=io.ReadAll(res.Body)iferr!=nil{fmt.Println(err)return}fmt.Println(string(body))}
Java
              
importcom.squareup.okhttp.*;OkHttpClientclient=newOkHttpClient();HttpUrl.BuilderurlBuilder=HttpUrl.parse("https://support.zendesk.com/api/v2/channels/voice/settings").newBuilder();Requestrequest=newRequest.Builder().url(urlBuilder.build()).method("GET",null).addHeader("Content-Type","application/json").addHeader("Authorization",Credentials.basic("your-email","your-password")).build();Responseresponse=client.newCall(request).execute();
Nodejs
              
varaxios=require('axios');varconfig={method:'GET',url:'https://support.zendesk.com/api/v2/channels/voice/settings',headers:{'Content-Type':'application/json','Authorization':'Basic ',// Base64 encoded "username:password"},};axios(config).then(function(response){console.log(JSON.stringify(response.data));}).catch(function(error){console.log(error);});
Python
              
importrequestsurl="https://support.zendesk.com/api/v2/channels/voice/settings"headers={"Content-Type":"application/json",}response=requests.request("GET",url,auth=('',''),headers=headers)print(response.text)
Ruby
              
require"net/http"uri=URI("https://support.zendesk.com/api/v2/channels/voice/settings")request=Net::HTTP::Get.new(uri,"Content-Type":"application/json")request.basic_auth"username","password"response=Net::HTTP.start uri.hostname,uri.port,use_ssl:truedo|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}}

Update Voice Settings

  • PUT /api/v2/channels/voice/settings

Allowed For

  • Agents

Example body

             
{"settings":{"voice":false}}

Code Samples

旋度
              
旋度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")funcmain(){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)iferr!=nil{fmt.Println(err)return}req.Header.Add("Content-Type","application/json")req.Header.Add("Authorization","Basic ")// Base64 encoded "username:password"client:=&http.Client{}res,err:=client.Do(req)iferr!=nil{fmt.Println(err)return}deferres.Body.Close()body,err:=io.ReadAll(res.Body)iferr!=nil{fmt.Println(err)return}fmt.Println(string(body))}
Java
              
importcom.squareup.okhttp.*;OkHttpClientclient=newOkHttpClient();HttpUrl.BuilderurlBuilder=HttpUrl.parse("https://support.zendesk.com/api/v2/channels/voice/settings").newBuilder();RequestBodybody=RequestBody.create(MediaType.parse("application/json"),"""{\"settings\":{\"voice\":false}}""");Requestrequest=newRequest.Builder().url(urlBuilder.build()).method("PUT",body).addHeader("Content-Type","application/json").addHeader("Authorization",Credentials.basic("your-email","your-password")).build();Responseresponse=client.newCall(request).execute();
Nodejs
              
varaxios=require('axios');vardata=JSON.stringify({"settings":{"voice":false}});varconfig={method:'PUT',url:'https://support.zendesk.com/api/v2/channels/voice/settings',headers:{'Content-Type':'application/json','Authorization':'Basic ',// Base64 encoded "username:password"},data:data,};axios(config).then(function(response){console.log(JSON.stringify(response.data));}).catch(function(error){console.log(error);});
Python
              
importrequestsimportjsonurl="https://support.zendesk.com/api/v2/channels/voice/settings"payload=json.loads("""{"settings": {"voice": false}}""")headers={"Content-Type":"application/json",}response=requests.request("PUT",url,auth=('',''),headers=headers,json=payload)print(response.text)
Ruby
              
require"net/http"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}})request.basic_auth"username","password"response=Net::HTTP.start uri.hostname,uri.port,use_ssl:truedo|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}}