Interactive voice response (IVR) uses keypad tones to route customers to the right agent or department, provide recorded responses for frequently asked questions, and deflect calls by allowing callers to switch the interaction to text. IVR is available on the Talk Professional and Enterprise plans. For more information, see Route incoming calls with IVR in the Zendesk Help Center.
IVR are represented as JSON objects with the following properties:
Name
Type
Read-only
Mandatory
Description
id
integer
true
false
The IVR ID
menus
array
false
false
The list of the IVR menus
name
string
false
false
The name of the IVR
phone_number_ids
array
false
false
The list of IDs of all the phone numbers configured with this IVR
phone_number_names
array
true
false
The list of the names of all the phone numbers configured with this IVR
Example
{
"id" : 10001 ,
"menus" : [
{
"default" : true ,
"greeting_id" : 10001 ,
"id" : 10001 ,
"name" : "Main menu" ,
"routes" : [
{
"action" : "group" ,
"greeting" : null ,
"id" : 10001 ,
"keypress" : "0" ,
"option_text" : "Support Group" ,
"options" : {
"group_ids" : [
10001
]
}
}
]
}
] ,
"name" : "IVR menus" ,
"phone_number_ids" : [
1
] ,
"phone_number_names" : [
"Main menu"
]
}
List IVRs
GET /api/v2/channels/voice/ivr
Allowed For
Code Samples
curl
curl https:// { subdomain } .zendesk.com/api/v2/channels/voice/ivr.json \
-v -u { email_address } : { password } -X GET
Go
import (
"fmt"
"io"
"net/http"
)
func main ( ) {
url := "https://support.zendesk.com/api/v2/channels/voice/ivr"
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>" )
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/ivr" )
. newBuilder ( ) ;
Request request = new Request . Builder ( )
. url ( urlBuilder . build ( ) )
. method ( "GET" , null )
. addHeader ( "Content-Type" , "application/json" )
. addHeader ( "Authorization" , Credentials . basic ( "your-email" , "your-password" ) )
. 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/ivr' ,
headers : {
'Content-Type' : 'application/json' ,
'Authorization' : 'Basic <auth-value>' ,
} ,
} ;
axios ( config )
. then ( function ( response ) {
console . log ( JSON . stringify ( response . data ) ) ;
} )
. catch ( function ( error ) {
console . log ( error ) ;
} ) ;
Python
import requests
url = "https://support.zendesk.com/api/v2/channels/voice/ivr"
headers = {
"Content-Type" : "application/json" ,
}
response = requests . request (
"GET" ,
url ,
auth = ( '<username>' , '<password>' ) ,
headers = headers
)
print ( response . text )
Ruby
require "net/http"
uri = URI ( "https://support.zendesk.com/api/v2/channels/voice/ivr" )
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 : true do | http |
http . request ( request )
end
Example response(s)
200 OK
{
"count" : 1 ,
"ivrs" : [
{
"id" : 10001 ,
"menus" : [
{
"default" : true ,
"greeting_id" : 10001 ,
"id" : 10001 ,
"name" : "Main menu" ,
"routes" : [
{
"action" : "group" ,
"greeting" : null ,
"id" : 10001 ,
"keypress" : "0" ,
"option_text" : "Support Group" ,
"options" : {
"group_ids" : [
10001
]
}
}
]
}
] ,
"name" : "IVR Menu" ,
"phone_number_ids" : [ ] ,
"phone_number_names" : [ ]
}
] ,
"next_page" : null ,
"previous_page" : null
}
Show IVR
GET /api/v2/channels/voice/ivr/{ivr_id}
Allowed For
Parameters
Name
Type
In
Required
Description
ivr_id
integer
Path
true
The ID of the IVR
Code Samples
curl
curl https:// { subdomain } .zendesk.com/api/v2/channels/voice/ivr/ { ivr_id } .json \
-v -u { email_address } : { password } -X GET
Go
import (
"fmt"
"io"
"net/http"
)
func main ( ) {
url := "https://support.zendesk.com/api/v2/channels/voice/ivr/10001"
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>" )
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/ivr/10001" )
. newBuilder ( ) ;
Request request = new Request . Builder ( )
. url ( urlBuilder . build ( ) )
. method ( "GET" , null )
. addHeader ( "Content-Type" , "application/json" )
. addHeader ( "Authorization" , Credentials . basic ( "your-email" , "your-password" ) )
. 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/ivr/10001' ,
headers : {
'Content-Type' : 'application/json' ,
'Authorization' : 'Basic <auth-value>' ,
} ,
} ;
axios ( config )
. then ( function ( response ) {
console . log ( JSON . stringify ( response . data ) ) ;
} )
. catch ( function ( error ) {
console . log ( error ) ;
} ) ;
Python
import requests
url = "https://support.zendesk.com/api/v2/channels/voice/ivr/10001"
headers = {
"Content-Type" : "application/json" ,
}
response = requests . request (
"GET" ,
url ,
auth = ( '<username>' , '<password>' ) ,
headers = headers
)
print ( response . text )
Ruby
require "net/http"
uri = URI ( "https://support.zendesk.com/api/v2/channels/voice/ivr/10001" )
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 : true do | http |
http . request ( request )
end
Example response(s)
200 OK
{
"ivr" : {
"id" : 10001 ,
"menus" : [
{
"default" : true ,
"greeting_id" : 10001 ,
"id" : 10001 ,
"name" : "Main menu" ,
"routes" : [
{
"action" : "group" ,
"greeting" : null ,
"id" : 10001 ,
"keypress" : "0" ,
"option_text" : "Support Group" ,
"options" : {
"group_ids" : [
10001
]
}
}
]
}
] ,
"name" : "IVR Menu" ,
"phone_number_ids" : [
6
] ,
"phone_number_names" : [
"Awesome Support Line"
]
}
}
Create IVR
POST /api/v2/channels/voice/ivr
Allowed For
Example body
{
"ivr" : {
"name" : "IVR Menu"
}
}
Code Samples
curl
curl https:// { subdomain } .zendesk.com/api/v2/channels/voice/ivr.json \
-H "Content-Type: application/json" -d '{"ivr": {"name": "IVR Menu"}}' \
-v -u { email_address } : { password } -X POST
Go
import (
"fmt"
"io"
"net/http"
"strings"
)
func main ( ) {
url := "https://support.zendesk.com/api/v2/channels/voice/ivr"
method := "POST"
payload := strings . NewReader ( `{
"ivr": {
"name": "IVR Menu"
}
}` )
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>" )
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/ivr" )
. newBuilder ( ) ;
RequestBody body = RequestBody . create ( MediaType . parse ( "application/json" ) ,
"" "
{
\"ivr\" : {
\"name\" : \" IVR Menu \"
}
} "" " ) ;
Request request = new Request . Builder ( )
. url ( urlBuilder . build ( ) )
. method ( "POST" , body )
. addHeader ( "Content-Type" , "application/json" )
. addHeader ( "Authorization" , Credentials . basic ( "your-email" , "your-password" ) )
. build ( ) ;
Response response = client . newCall ( request ) . execute ( ) ;
Nodejs
var axios = require ( 'axios' ) ;
var data = JSON . stringify ( {
"ivr" : {
"name" : "IVR Menu"
}
} ) ;
var config = {
method : 'POST' ,
url : 'https://support.zendesk.com/api/v2/channels/voice/ivr' ,
headers : {
'Content-Type' : 'application/json' ,
'Authorization' : 'Basic <auth-value>' ,
} ,
data : data ,
} ;
axios ( config )
. then ( function ( response ) {
console . log ( JSON . stringify ( response . data ) ) ;
} )
. catch ( function ( error ) {
console . log ( error ) ;
} ) ;
Python
import requests
import json
url = "https://support.zendesk.com/api/v2/channels/voice/ivr"
payload = json . loads ( """{
"ivr": {
"name": "IVR Menu"
}
}""" )
headers = {
"Content-Type" : "application/json" ,
}
response = requests . request (
"POST" ,
url ,
auth = ( '<username>' , '<password>' ) ,
headers = headers ,
json = payload
)
print ( response . text )
Ruby
require "net/http"
uri = URI ( "https://support.zendesk.com/api/v2/channels/voice/ivr" )
request = Net : : HTTP : : Post . new ( uri , "Content-Type" : "application/json" )
request . body = % q ( {
"ivr" : {
"name" : "IVR Menu"
}
} )
request . basic_auth "username" , "password"
response = Net : : HTTP . start uri . hostname , uri . port , use_ssl : true do | http |
http . request ( request )
end
Example response(s)
201 Created
{
"ivr" : {
"id" : 10001 ,
"menus" : [
{
"default" : true ,
"greeting_id" : 10001 ,
"id" : 10001 ,
"name" : "Main menu" ,
"routes" : [
{
"action" : "group" ,
"greeting" : null ,
"id" : 10001 ,
"keypress" : "0" ,
"option_text" : "Support Group" ,
"options" : {
"group_ids" : [
10001
]
}
}
]
}
] ,
"name" : "IVR Menu" ,
"phone_number_ids" : [
6
] ,
"phone_number_names" : [
"Awesome Support Line"
]
}
}
Update IVR
PUT /api/v2/channels/voice/ivr/{ivr_id}
Allowed For
Parameters
Name
Type
In
Required
Description
ivr_id
integer
Path
true
The ID of the IVR
Example body
{
"ivr" : {
"name" : "IVR Menu"
}
}
Code Samples
curl
curl https:// { subdomain } .zendesk.com/api/v2/channels/voice/ivr/ { ivr_id } .json \
-H "Content-Type: application/json" -d '{"ivr": {"name": "IVR Menu"}}' \
-v -u { email_address } : { password } -X PUT
Go
import (
"fmt"
"io"
"net/http"
"strings"
)
func main ( ) {
url := "https://support.zendesk.com/api/v2/channels/voice/ivr/10001"
method := "PUT"
payload := strings . NewReader ( `{
"ivr": {
"name": "IVR Menu"
}
}` )
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>" )
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/ivr/10001" )
. newBuilder ( ) ;
RequestBody body = RequestBody . create ( MediaType . parse ( "application/json" ) ,
"" "
{
\"ivr\" : {
\"name\" : \" IVR Menu \"
}
} "" " ) ;
Request request = new Request . Builder ( )
. url ( urlBuilder . build ( ) )
. method ( "PUT" , body )
. addHeader ( "Content-Type" , "application/json" )
. addHeader ( "Authorization" , Credentials . basic ( "your-email" , "your-password" ) )
. build ( ) ;
Response response = client . newCall ( request ) . execute ( ) ;
Nodejs
var axios = require ( 'axios' ) ;
var data = JSON . stringify ( {
"ivr" : {
"name" : "IVR Menu"
}
} ) ;
var config = {
method : 'PUT' ,
url : 'https://support.zendesk.com/api/v2/channels/voice/ivr/10001' ,
headers : {
'Content-Type' : 'application/json' ,
'Authorization' : 'Basic <auth-value>' ,
} ,
data : data ,
} ;
axios ( config )
. then ( function ( response ) {
console . log ( JSON . stringify ( response . data ) ) ;
} )
. catch ( function ( error ) {
console . log ( error ) ;
} ) ;
Python
import requests
import json
url = "https://support.zendesk.com/api/v2/channels/voice/ivr/10001"
payload = json . loads ( """{
"ivr": {
"name": "IVR Menu"
}
}""" )
headers = {
"Content-Type" : "application/json" ,
}
response = requests . request (
"PUT" ,
url ,
auth = ( '<username>' , '<password>' ) ,
headers = headers ,
json = payload
)
print ( response . text )
Ruby
require "net/http"
uri = URI ( "https://support.zendesk.com/api/v2/channels/voice/ivr/10001" )
request = Net : : HTTP : : Put . new ( uri , "Content-Type" : "application/json" )
request . body = % q ( {
"ivr" : {
"name" : "IVR Menu"
}
} )
request . basic_auth "username" , "password"
response = Net : : HTTP . start uri . hostname , uri . port , use_ssl : true do | http |
http . request ( request )
end
Example response(s)
200 OK
{
"ivr" : {
"id" : 10001 ,
"menus" : [
{
"default" : true ,
"greeting_id" : 10001 ,
"id" : 10001 ,
"name" : "Main menu" ,
"routes" : [
{
"action" : "group" ,
"greeting" : null ,
"id" : 10001 ,
"keypress" : "0" ,
"option_text" : "Support Group" ,
"options" : {
"group_ids" : [
10001
]
}
}
]
}
] ,
"name" : "IVR Menu" ,
"phone_number_ids" : [
6
] ,
"phone_number_names" : [
"Awesome Support Line"
]
}
}
Delete IVR
DELETE /api/v2/channels/voice/ivr/{ivr_id}
Allowed For
Parameters
Name
Type
In
Required
Description
ivr_id
integer
Path
true
The ID of the IVR
Code Samples
curl
curl https:// { subdomain } .zendesk.com/api/v2/channels/voice/ivr/ { ivr_id } .json \
-v -u { email_address } : { password } -X DELETE
Go
import (
"fmt"
"io"
"net/http"
)
func main ( ) {
url := "https://support.zendesk.com/api/v2/channels/voice/ivr/10001"
method := "DELETE"
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>" )
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/ivr/10001" )
. newBuilder ( ) ;
Request request = new Request . Builder ( )
. url ( urlBuilder . build ( ) )
. method ( "DELETE" , null )
. addHeader ( "Content-Type" , "application/json" )
. addHeader ( "Authorization" , Credentials . basic ( "your-email" , "your-password" ) )
. build ( ) ;
Response response = client . newCall ( request ) . execute ( ) ;
Nodejs
var axios = require ( 'axios' ) ;
var config = {
method : 'DELETE' ,
url : 'https://support.zendesk.com/api/v2/channels/voice/ivr/10001' ,
headers : {
'Content-Type' : 'application/json' ,
'Authorization' : 'Basic <auth-value>' ,
} ,
} ;
axios ( config )
. then ( function ( response ) {
console . log ( JSON . stringify ( response . data ) ) ;
} )
. catch ( function ( error ) {
console . log ( error ) ;
} ) ;
Python
import requests
url = "https://support.zendesk.com/api/v2/channels/voice/ivr/10001"
headers = {
"Content-Type" : "application/json" ,
}
response = requests . request (
"DELETE" ,
url ,
auth = ( '<username>' , '<password>' ) ,
headers = headers
)
print ( response . text )
Ruby
require "net/http"
uri = URI ( "https://support.zendesk.com/api/v2/channels/voice/ivr/10001" )
request = Net : : HTTP : : Delete . new ( uri , "Content-Type" : "application/json" )
request . basic_auth "username" , "password"
response = Net : : HTTP . start uri . hostname , uri . port , use_ssl : true do | http |
http . request ( request )
end
Example response(s)
200 OK
{
"ivr" : {
"id" : 10001 ,
"menus" : [
{
"default" : true ,
"greeting_id" : 10001 ,
"id" : 10001 ,
"name" : "Main menu" ,
"routes" : [
{
"action" : "group" ,
"greeting" : null ,
"id" : 10001 ,
"keypress" : "0" ,
"option_text" : "Support Group" ,
"options" : {
"group_ids" : [
10001
]
}
}
]
}
] ,
"name" : "IVR Menu" ,
"phone_number_ids" : [
6
] ,
"phone_number_names" : [
"Awesome Support Line"
]
}
}