Greetings
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:
Name | Type | Read-only | Mandatory | Description |
---|---|---|---|---|
active | boolean | true | false | The value is true if the greeting is associated with one or more phone numbers |
audio_name | string | false | false | Greeting audio name provided in greeting .mp3 or .wav format |
audio_url | string | false | false | The path to the greeting sound file |
category_id | integer | false | true | The id of the greeting category. *Writeable on create only. |
default | boolean | true | false | True if the greeting is a system default greeting |
default_lang | boolean | false | false | Whether or not the greeting has a default language |
has_sub_settings | boolean | false | false | Sub-settings for categorized greetings |
id | true | false | The greeting ID | |
ivr_ids | array | false | false | The IDs of the IVRs associated with the greeting |
name | string | false | true | The name of the greeting |
pending | boolean | false | false | Whether or not the greeting is pending |
phone_number_ids | array | false | false | The IDs of the phone numbers associated with the greeting |
upload_id | integer | false | false | Upload 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:
Name | Type | Read-only | Mandatory | Description |
---|---|---|---|---|
id | integer | true | false | The greeting category ID |
name | string | true | false | The name of the greeting category |
{
"id": 1,
"name": "voicemail"
}
Using curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/greeting_categories.json \
-v -u {email_address}:{password} -X GET
Example Response
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
Name | Type | In | Required | Description |
---|---|---|---|---|
greeting_categories_id | integer | Path | true | ID of the greeting category |
Using curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/greeting_categories/{greeting_categories_id}.json \
-v -u {email_address}:{password}
Example Response
Status 200 OK
{
"greeting_category": {
"id": 1,
"name": "voicemail"
}
}
List Greetings
GET /api/v2/channels/voice/greetings
Allowed For
- Agents
Using curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/greetings.json \
-v -u {email_address}:{password} -X GET
Example Response
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
Name | Type | In | Required | Description |
---|---|---|---|---|
greetings_id | integer | Path | true | ID of the greeting |
Using curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/greetings/{greetings_id}.json \
-v -u {email_address}:{password}
Example Response
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
Name | Type | In | Required | Description |
---|---|---|---|---|
greetings_id | integer | Path | true | ID of the greeting |
Using curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/greetings/{greetings_id}/upload.mp3 \
-v -u {email_address}:{password}
Example Response
Status 200 OK
Create Greeting
POST /api/v2/channels/voice/greetings
Allowed For
- Agents
Example Body
{
"greeting": {
"category_id": 1,
"name": "Hello"
}
}
Using 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}
Example Response
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][email protected]/path/to/file.mp3'
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
greetings_id | integer | Path | true | ID of the greeting |
Example Body
{
"greeting": {
"name": "Premium Support"
}
}
Using 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
Using 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][email protected]/path/to/file.mp3' \
-v -u {email_address}:{password} -X PUT
Example Response
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
Name | Type | In | Required | Description |
---|---|---|---|---|
greetings_id | integer | Path | true | ID of the greeting |
Using curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/greetings/{greetings_id}.json \
-v -u {email_address}:{password} -X DELETE
Example Response
Status 200 OK
{
"greeting": {
"category_id": 1,
"id": 1,
"name": "Premium Support"
}
}