Zendesk voice provides a number of default greetings. You can either use the default greetings or replace them with custom greetings. See Managing outgoing greetings in Zendesk help.

Greetings are assigned to greeting categories.

JSON format

Greetings are represented as JSON objects with the following properties:

NameTypeRead-onlyMandatoryDescription
activebooleantruefalseThe value is true if the greeting is associated with one or more phone numbers
audio_namestringfalsefalseGreeting audio name provided in greeting .mp3 or .wav format
audio_urlstringfalsefalseThe path to the greeting sound file
category_idintegerfalsetrueThe id of the greeting category. *Writeable on create only.
defaultbooleantruefalseTrue if the greeting is a system default greeting
default_langbooleanfalsefalseWhether or not the greeting has a default language
has_sub_settingsbooleanfalsefalseSub-settings for categorized greetings
idtruefalseThe greeting ID
ivr_idsarrayfalsefalseThe IDs of the IVRs associated with the greeting
namestringfalsetrueThe name of the greeting
pendingbooleanfalsefalseWhether or not the greeting is pending
phone_number_idsarrayfalsefalseThe IDs of the phone numbers associated with the greeting
upload_idintegerfalsefalseUpload ID associated with the greeting

Example

{  "active": true,  "audio_url": "/system/voice/uploads/0000/0002/premium-support-greeting.mp3",  "category_id": 1,  "default": false,  "id": 123,  "name": "Premium Support"}

List Greeting Categories

  • GET /api/v2/channels/voice/greeting_categories

Allowed For

  • Agents

Greeting categories are represented as JSON objects which have the following keys:

NameTypeRead-onlyMandatoryDescription
idintegertruefalseThe greeting category ID
namestringtruefalseThe name of the greeting category
{   "id":    1,   "name":  "voicemail"}

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/greeting_categories.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/greeting_categories"	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/greeting_categories")		.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/greeting_categories',  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/greeting_categories"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/greeting_categories")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
{  "greeting_categories": [    {      "id": 1,      "name": "voicemail"    },    {      "id": 2,      "name": "available"    }  ]}

Show Greeting Category

  • GET /api/v2/channels/voice/greeting_categories/{greeting_categories_id}

Allowed For

  • Agents

Parameters

NameTypeInRequiredDescription
greeting_categories_idintegerPathtrueID of the greeting category

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/greeting_categories/{greeting_categories_id}.json \  -v -u {email_address}:{password}
Go
import (	"fmt"	"io"	"net/http")
func main() {	url := "https://support.zendesk.com/api/v2/channels/voice/greeting_categories/1"	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/greeting_categories/1")		.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/greeting_categories/1',  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/greeting_categories/1"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/greeting_categories/1")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
{  "greeting_category": {    "id": 1,    "name": "voicemail"  }}

List Greetings

  • GET /api/v2/channels/voice/greetings

Allowed For

  • Agents

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/greetings.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/greetings"	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/greetings")		.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/greetings',  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/greetings"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/greetings")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": 2,  "greetings": [    {      "category_id": 1,      "id": 1,      "name": "Premium Support 1"    },    {      "category_id": 1,      "id": 2,      "name": "Premium Support 2"    }  ],  "next_page": null,  "previous_page": null}

Show Greeting

  • GET /api/v2/channels/voice/greetings/{greetings_id}

Allowed For

  • Agents

Parameters

NameTypeInRequiredDescription
greetings_idintegerPathtrueID of the greeting

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/greetings/{greetings_id}.json \  -v -u {email_address}:{password}
Go
import (	"fmt"	"io"	"net/http")
func main() {	url := "https://support.zendesk.com/api/v2/channels/voice/greetings/1"	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/greetings/1")		.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/greetings/1',  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/greetings/1"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/greetings/1")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
{  "greeting": {    "category_id": 1,    "id": 1,    "name": "Premium Support"  }}

Get Greeting Audio File

  • GET /api/v2/channels/voice/greetings/{greetings_id}/upload

Allowed For

  • Agents

Parameters

NameTypeInRequiredDescription
greetings_idintegerPathtrueID of the greeting

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/greetings/{greetings_id}/upload.mp3 \  -v -u {email_address}:{password}
Go
import (	"fmt"	"io"	"net/http")
func main() {	url := "https://support.zendesk.com/api/v2/channels/voice/greetings/1/upload"	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/greetings/1/upload")		.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/greetings/1/upload',  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/greetings/1/upload"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/greetings/1/upload")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
null

Create Greeting

  • POST /api/v2/channels/voice/greetings

Allowed For

  • Agents

Example body

{  "greeting": {    "category_id": 1,    "name": "Hello"  }}

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/greetings.json \  -H "Content-Type: application/json" -X POST -d '{"greeting": {"name": "Hello", "category_id": 1}}' \  -v -u {email_address}:{password}
Go
import (	"fmt"	"io"	"net/http"	"strings")
func main() {	url := "https://support.zendesk.com/api/v2/channels/voice/greetings"	method := "POST"	payload := strings.NewReader(`{  "greeting": {    "category_id": 1,    "name": "Hello"  }}`)	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/greetings")		.newBuilder();RequestBody body = RequestBody.create(MediaType.parse("application/json"),		"""{  \"greeting\": {    \"category_id\": 1,    \"name\": \"Hello\"  }}""");
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({  "greeting": {    "category_id": 1,    "name": "Hello"  }});
var config = {  method: 'POST',  url: 'https://support.zendesk.com/api/v2/channels/voice/greetings',  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/greetings"
payload = json.loads("""{  "greeting": {    "category_id": 1,    "name": "Hello"  }}""")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/greetings")request = Net::HTTP::Post.new(uri, "Content-Type": "application/json")request.body = %q({  "greeting": {    "category_id": 1,    "name": "Hello"  }})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
{  "greeting": {    "category_id": 1,    "id": 1,    "name": "Premium Support"  }}

Update Greeting

  • PUT /api/v2/channels/voice/greetings/{greetings_id}

Updates the greeting object or the recording of the greeting file. See the Using curl sections below for more information.

Allowed For

  • Agents

Content Types

In addition to application/json, this endpoint supports multipart/form-data to upload local mp3 or wav files. If using multipart/form-data, the name of the input form field is greeting[upload_attributes][uploaded_data]. The following example uses the -F form option in cURL:

-F 'greeting[upload_attributes][uploaded_data]=@/path/to/file.mp3'

Parameters

NameTypeInRequiredDescription
greetings_idintegerPathtrueID of the greeting

Example body

{  "greeting": {    "name": "Premium Support"  }}

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/greetings/{greetings_id}.json \  -H "Content-Type: application/json" -d '{"greeting": {"name": "Hello"}}' \  -v -u {email_address}:{password} -X PUT
curl

You can update an audio file for a greeting by uploading a local mp3 or wav file.

curl https://{subdomain}.zendesk.com/api/v2/channels/voice/greetings/{greeting_id}.json \  -F 'greeting[upload_attributes][uploaded_data]=@/path/to/file.mp3' \  -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/greetings/1"	method := "PUT"	payload := strings.NewReader(`{  "greeting": {    "name": "Premium Support"  }}`)	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/greetings/1")		.newBuilder();RequestBody body = RequestBody.create(MediaType.parse("application/json"),		"""{  \"greeting\": {    \"name\": \"Premium Support\"  }}""");
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({  "greeting": {    "name": "Premium Support"  }});
var config = {  method: 'PUT',  url: 'https://support.zendesk.com/api/v2/channels/voice/greetings/1',  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/greetings/1"
payload = json.loads("""{  "greeting": {    "name": "Premium Support"  }}""")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/greetings/1")request = Net::HTTP::Put.new(uri, "Content-Type": "application/json")request.body = %q({  "greeting": {    "name": "Premium Support"  }})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
{  "greeting": {    "category_id": 1,    "id": 1,    "name": "Premium Support"  }}

Delete Greeting

  • DELETE /api/v2/channels/voice/greetings/{greetings_id}

Allowed For

  • Agents

Parameters

NameTypeInRequiredDescription
greetings_idintegerPathtrueID of the greeting

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/greetings/{greetings_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/greetings/1"	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/greetings/1")		.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/greetings/1',  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/greetings/1"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/greetings/1")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
{  "greeting": {    "category_id": 1,    "id": 1,    "name": "Premium Support"  }}