Greetings

Greeting category JSON Format

A greeting category has the following keys:

Name Type Comment
id integer The greeting category ID
name string The name of the greeting category
Example
{
   "id":    1,
   "name":  "voicemail"
}

List Greeting Categories

GET /api/v2/channels/voice/greeting_categories.json

Allowed For
  • Agents
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/{id}.json

Allowed For
  • Agents
Using curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/greeting_categories/{id}.json \
  -v -u {email_address}:{password}
Example Response
Status: 200 OK

{
  "greeting_category": {
    "id":   1,
    "name": "voicemail"
  }
}

Greeting JSON Format

A greeting has the following keys:

Name Type Read-only Madatory Comment
id integer yes no The greeting ID
name string no yes The name of the greeting
category_id integer no* yes The id of the greeting category. *Writeable on create only.
default boolean yes no True if the greeting is a system default greeting
active boolean yes no True if the greeting is associated with one or more phone numbers
audio_url string no no The path to the greeting sound file
Example
{
   "id":               123,
   "name":             "Premium Support",
   "category_id":      1,
   "default":          false,
   "active":           true,
   "audio_url":        "/system/voice/uploads/0000/0002/premium-support-greeting.mp3",
}

List Greetings

GET /api/v2/channels/voice/greetings.json

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

{
  "greetings": [
    {
      "id":   1,
      "name": "Premium Support 1",
      ...
    },
    {
      "id":   2,
      "name": "Premium Support 2",
      ...
    }
  ]
}

Show Greeting

GET /api/v2/channels/voice/greetings/{id}.json

Allowed For
  • Agents
Using curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/greetings/{id}.json \
  -v -u {email_address}:{password}
Example Response
Status: 200 OK

{
  "greeting": {
    "id":   1,
    "name": "Premium Support",
    ...
  }
}

Get Greeting Audio File

GET /api/v2/channels/voice/greetings/{id}/recording.mp3

Allowed For
  • Agents
Using curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/greetings/{id}/recording.mp3 \
  -v -u {email_address}:{password}

Create Greetings

POST /api/v2/channels/voice/greetings.json

Allowed For
  • Agents
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": {
    "id":    1,
    "name":  "Premium Support",
    ...
  }
}

Update Greetings

PUT /api/v2/channels/voice/greetings/{id}.json

Allowed For
  • Agents
Example Request
{
  "greeting": {
    "name": "Premium Support"
  }
}
Using curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/greetings/{id}.json \
  -H "Content-Type: application/json" -d '{"greeting": {"name": "Hello"}}' \
  -v -u {email_address}:{password} -X PUT
Example Response
Status: 200 OK

{
  "greeting": {
    "id":    1,
    "name":  "Premium Support",
    ...
  }
}

Update an Audio File for a Greeting

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

Using curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/greetings/{id}.json \
  -F 'greeting[upload_attributes][uploaded_data][email protected]/path/to/file.mp3' \
  -v -u {email_address}:{password} -X PUT

Delete Greeting

DELETE /api/v2/channels/voice/greetings/{id}.json

Allowed For
  • Agents
Using curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/greetings/{id}.json \
  -v -u {email_address}:{password} -X DELETE
Example Response
Status: 200 OK