Lines

This API lets you list the available lines (phone numbers and digital lines) in your Zendesk voice account. See Managing Zendesk Talk lines in Zendesk help.

JSON format

Lines are represented as JSON objects with the following properties:

Name Type Read-only Mandatory Description
count integer false false
lines array false false Array of lines
next_page integer false false
previous_page integer false false

List Lines

  • GET /api/v2/channels/voice/lines

Allowed For

  • Agents

Minimizing the results

You can reduce the number of properties per line in the response with the minimal_mode=true query string parameter. Example:

/api/v2/channels/voice/lines?minimal_mode=true

The minimized result is a mix of phone numbers and digital lines. Some entries might have different properties but all entries will have the following properties:

  • id
  • country_code
  • external
  • nickname
  • priority
  • brand_id

Parameters

Name Type In Required Description
minimal_mode boolean Query false Enable minimized results

Using curl

curl https://{subdomain}.zendesk.com/api/v2/channels/voice/lines.json \  -v -u {email_address}:{password}

Example response(s)

200 OK
Status 200 OK
{  "count": 2,  "lines": [    {      "capabilities": {        "emergency_address": true,        "mms": false,        "sms": true,        "voice": true      },      "categorised_greetings": {        "1": "voicemail_en",        "2": "available_en"      },      "categorised_greetings_with_sub_settings": {        "1": {          "voicemail_off_inside_business_hours": "voicemail_en_voicemail_config,",          "voicemail_off_outside_business_hours": "voicemail_en_voicemail_config",          "voicemail_on_inside_business_hours": "voicemail_en"        },        "2": {          "voicemail_off": "available_en_voicemail_config",          "voicemail_on": "available_en"        }      },      "country_code": "US",      "created_at": "2013-04-13T16:02:33Z",      "default_greeting_ids": [        "voicemail_en",        "available_jp"      ],      "default_group_id": 1,      "display_number": "+353 76 680 1402",      "external": false,      "greeting_ids": [        1,        2      ],      "group_ids": [        1,        2      ],      "id": 6,      "location": "TX",      "name": "Awesome Support Line",      "nickname": "Awesome Support Line",      "number": "+353766801402",      "recorded": true,      "sms_group_id": 7,      "toll_free": false,      "transcription": false    },    {      "brand_id": 1,      "call_recording_consent": "always",      "categorised_greetings_with_sub_settings": {        "1": {          "voicemail_off_inside_business_hours": "voicemail_en_voicemail_config",          "voicemail_off_outside_business_hours": "voicemail_en_voicemail_config",          "voicemail_on_inside_business_hours": "voicemail_en"        },        "2": {          "voicemail_off": "available_en_voicemail_config",          "voicemail_on": "available_en,"        }      },      "created_at": "2013-04-13T16:02:33Z",      "default_greeting_ids": [        "voicemail_en",        "available_jp"      ],      "default_group_id": 1,      "greeting_ids": [        1,        2      ],      "group_ids": [        1,        2      ],      "id": 6,      "nickname": "Awesome Support Line",      "recorded": true,      "transcription": false    }  ],  "next_page": null,  "previous_page": null}