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.

JSON format

IVR Routes are represented as JSON objects with the following properties:

NameTypeRead-onlyMandatoryDescription
actionstringfalsefalseThe action that will be performed by the IVR route. See Valid IVR Route Actions. Allowed values are "group", "voicemail", "phone_number", "textback", or "menu".
greetingstringtruefalseThe name of the greeting associated with the IVR route
idintegertruefalseThe IVR route ID
keypressstringfalsefalseThe keypress associated with the IVR route. Allowed values are "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "*", "#", or "default".
option_textstringtruefalseA text describing the options of the route. Example: When the option is group, "option_text" will be the name of the associated group
optionsobjectfalsefalseThe options for the IVR route depending on the action. See Valid IVR Route Actions
overflow_optionsarrayfalsefalseOptions for managing overflow calls

Valid IVR Route Actions

ActionOptionTypeDescription
groupgroup_idsarrayValid group ids
voicemailgroup_idsarrayValid group ids
phone_numberphone_numberstringValid phone number
textbacksms_textstringstringText to be sent in the sms message
textbacktextback_phone_number_idintegerValid id of the text enabled phone number
menumenu_idintegerValid IVR menu id

Example

{  "action": "group",  "greeting": null,  "id": 10001,  "keypress": "0",  "option_text": "Support Group",  "options": {    "group_ids": [      360001381413    ]  }}

List IVR Routes

  • GET /api/v2/channels/voice/ivr/{ivr_id}/menus/{menu_id}/routes

Allowed For

  • Agents

Parameters

NameTypeInRequiredDescription
ivr_idintegerPathtrueThe ID of the IVR
menu_idintegerPathtrueThe ID of the IVR Menu

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/ivr/{ivr_id}/menus/{menu_id}/routes.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/menus/10001/routes"	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 "username:password"
	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/menus/10001/routes")		.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/menus/10001/routes',  headers: {	'Content-Type': 'application/json',	'Authorization': 'Basic <auth-value>', // Base64 encoded "username:password"  },};
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/menus/10001/routes"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/menus/10001/routes")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
// Status 200 OK
{  "count": 1,  "ivr_routes": [    {      "action": "group",      "greeting": null,      "id": 10001,      "keypress": "0",      "option_text": "Support Group",      "options": {        "group_ids": [          360001381413        ]      }    }  ],  "next_page": null,  "previous_page": null}

Show IVR Route

  • GET /api/v2/channels/voice/ivr/{ivr_id}/menus/{menu_id}/routes/{route_id}

Allowed For

  • Agents

Parameters

NameTypeInRequiredDescription
ivr_idintegerPathtrueThe ID of the IVR
menu_idintegerPathtrueThe ID of the IVR Menu
route_idintegerPathtrueThe ID of the IVR Route

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/ivr/{ivr_id}/menus/{menu_id}/routes/{route_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/menus/10001/routes/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>") // Base64 encoded "username:password"
	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/menus/10001/routes/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/menus/10001/routes/10001',  headers: {	'Content-Type': 'application/json',	'Authorization': 'Basic <auth-value>', // Base64 encoded "username:password"  },};
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/menus/10001/routes/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/menus/10001/routes/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
// Status 200 OK
{  "ivr_route": {    "action": "group",    "greeting": null,    "id": 10002,    "keypress": "1",    "option_text": "Support Group",    "options": {      "group_ids": [        10001      ]    }  }}

Create IVR Route

  • POST /api/v2/channels/voice/ivr/{ivr_id}/menus/{menu_id}/routes

Allowed For

  • Agents

Parameters

NameTypeInRequiredDescription
ivr_idintegerPathtrueThe ID of the IVR
menu_idintegerPathtrueThe ID of the IVR Menu

Example body

{  "ivr_route": {    "action": "group",    "keypress": "1",    "options": {      "group_ids": [        10001      ]    }  }}

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/ivr/{ivr_id}/menus/{menu_id}/routes.json \  -H "Content-Type: application/json" -d '{"ivr_route": {"keypress": "1", "action": "group", "options": {"group_ids" : [10001]}}}' \  -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/10001/menus/10001/routes"	method := "POST"	payload := strings.NewReader(`{  "ivr_route": {    "action": "group",    "keypress": "1",    "options": {      "group_ids": [        10001      ]    }  }}`)	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 "username:password"
	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/menus/10001/routes")		.newBuilder();RequestBody body = RequestBody.create(MediaType.parse("application/json"),		"""{  \"ivr_route\": {    \"action\": \"group\",    \"keypress\": \"1\",    \"options\": {      \"group_ids\": [        10001      ]    }  }}""");
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_route": {    "action": "group",    "keypress": "1",    "options": {      "group_ids": [        10001      ]    }  }});
var config = {  method: 'POST',  url: 'https://support.zendesk.com/api/v2/channels/voice/ivr/10001/menus/10001/routes',  headers: {	'Content-Type': 'application/json',	'Authorization': 'Basic <auth-value>', // Base64 encoded "username:password"  },  data : data,};
axios(config).then(function (response) {  console.log(JSON.stringify(response.data));}).catch(function (error) {  console.log(error);});
Python
import requestsimport json
url = "https://support.zendesk.com/api/v2/channels/voice/ivr/10001/menus/10001/routes"
payload = json.loads("""{  "ivr_route": {    "action": "group",    "keypress": "1",    "options": {      "group_ids": [        10001      ]    }  }}""")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/10001/menus/10001/routes")request = Net::HTTP::Post.new(uri, "Content-Type": "application/json")request.body = %q({  "ivr_route": {    "action": "group",    "keypress": "1",    "options": {      "group_ids": [        10001      ]    }  }})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
// Status 201 Created
{  "ivr_route": {    "action": "group",    "greeting": null,    "id": 10002,    "keypress": "1",    "option_text": "Support Group",    "options": {      "group_ids": [        10001      ]    }  }}

Update IVR Route

  • PUT /api/v2/channels/voice/ivr/{ivr_id}/menus/{menu_id}/routes/{route_id}

Allowed For

  • Agents

Parameters

NameTypeInRequiredDescription
ivr_idintegerPathtrueThe ID of the IVR
menu_idintegerPathtrueThe ID of the IVR Menu
route_idintegerPathtrueThe ID of the IVR Route

Example body

{  "ivr_route": {    "action": "group",    "keypress": "1",    "options": {      "group_ids": [        10001      ]    }  }}

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/ivr/{ivr_id}/menus/{menu_id}/routes/{id}.json \  -H "Content-Type: application/json" -d '{"ivr_route": {"keypress": "2"}}' \  -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/menus/10001/routes/10001"	method := "PUT"	payload := strings.NewReader(`{  "ivr_route": {    "action": "group",    "keypress": "1",    "options": {      "group_ids": [        10001      ]    }  }}`)	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 "username:password"
	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/menus/10001/routes/10001")		.newBuilder();RequestBody body = RequestBody.create(MediaType.parse("application/json"),		"""{  \"ivr_route\": {    \"action\": \"group\",    \"keypress\": \"1\",    \"options\": {      \"group_ids\": [        10001      ]    }  }}""");
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_route": {    "action": "group",    "keypress": "1",    "options": {      "group_ids": [        10001      ]    }  }});
var config = {  method: 'PUT',  url: 'https://support.zendesk.com/api/v2/channels/voice/ivr/10001/menus/10001/routes/10001',  headers: {	'Content-Type': 'application/json',	'Authorization': 'Basic <auth-value>', // Base64 encoded "username:password"  },  data : data,};
axios(config).then(function (response) {  console.log(JSON.stringify(response.data));}).catch(function (error) {  console.log(error);});
Python
import requestsimport json
url = "https://support.zendesk.com/api/v2/channels/voice/ivr/10001/menus/10001/routes/10001"
payload = json.loads("""{  "ivr_route": {    "action": "group",    "keypress": "1",    "options": {      "group_ids": [        10001      ]    }  }}""")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/menus/10001/routes/10001")request = Net::HTTP::Put.new(uri, "Content-Type": "application/json")request.body = %q({  "ivr_route": {    "action": "group",    "keypress": "1",    "options": {      "group_ids": [        10001      ]    }  }})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
// Status 200 OK
{  "ivr_route": {    "action": "group",    "greeting": null,    "id": 10002,    "keypress": "1",    "option_text": "Support Group",    "options": {      "group_ids": [        10001      ]    }  }}

Delete IVR Route

  • DELETE /api/v2/channels/voice/ivr/{ivr_id}/menus/{menu_id}/routes/{route_id}

Allowed For

  • Agents

Parameters

NameTypeInRequiredDescription
ivr_idintegerPathtrueThe ID of the IVR
menu_idintegerPathtrueThe ID of the IVR Menu
route_idintegerPathtrueThe ID of the IVR Route

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/ivr/{ivr_id}/menus/{menu_id}/routes/{route_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/menus/10001/routes/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>") // Base64 encoded "username:password"
	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/menus/10001/routes/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/menus/10001/routes/10001',  headers: {	'Content-Type': 'application/json',	'Authorization': 'Basic <auth-value>', // Base64 encoded "username:password"  },};
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/menus/10001/routes/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/menus/10001/routes/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
// Status 200 OK
{  "ivr_route": {    "action": "group",    "greeting": null,    "id": 10002,    "keypress": "1",    "option_text": "Support Group",    "options": {      "group_ids": [        10001      ]    }  }}