This API lets you manage the digital lines in your Zendesk voice account. See Managing Zendesk Talk lines in Zendesk help.

JSON format

Digital lines are represented as JSON objects with the following properties:

Name Type Read-only Mandatory Description
brand_id integer false false ID of brand associated with the digital line
call_recording_consent string false false What call recording consent is set to
categorised_greetings_with_sub_settings object true false The id and any settings associated with each greeting category. If the category has no settings, it defaults to the category name. See Managing outgoing greetings in Zendesk help
created_at string true false The date and time the digital line was created
default_greeting_ids array true false The names of default system greetings associated with the phone number. See Managing outgoing greetings in Zendesk help
default_group_id integer false false Default group id. *Writeable on most of the plans.
greeting_ids array false false Custom greetings associated with the digital line. See Create Greetings in the Talk API docs and Managing outgoing greetings in Zendesk help
group_ids array false false An array of associated groups. *Writeable on most plans. If omnichannel routing is enabled, only the first group_id provided is accepted for routing purposes
id integer true false Automatically assigned upon creation
line_id string true false Automatically assigned upon creation
line_type string false false The type line, either phone or digital
nickname string false false The nickname of the digital line
outbound_number string false false The outbound number phone number if outbound is to be enabled
priority integer false false Level of priority associated with the digital line
recorded boolean false false Whether calls for the line are recorded or not
schedule_id integer false false ID of schedule associated with the digital line
transcription boolean false false Whether calls for the line are transcribed or not

Example

{  "brand_id": 1,  "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 Digital Line",  "recorded": true,  "transcription": false}

Show Digital Line

  • GET /api/v2/channels/voice/digital_lines/{digital_line_id}

Allowed For

  • Agents

Parameters

Name Type In Required Description
digital_line_id integer Path true ID of a digital line

Using curl

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

Example response(s)

200 OK
Status 200 OK
{  "digital_line": {    "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  }}

Create Digital Line

  • POST /api/v2/channels/voice/digital_lines

Creates a Talk digital line.

Allowed For

  • Agents

Example body

{  "digital_line": {    "group_ids": [      1    ],    "nickname": "Awesome Digital Line"  }}

Using curl

curl https://{subdomain}.zendesk.com/api/v2/channels/voice/digital_lines.json \  -H "Content-Type: application/json" -X POST -d '{"digital_line" : {"nickname": "Awesome Digital Line", "group_ids": [1234] }}' \  -v -u {email_address}:{password}

Example response(s)

201 Created
Status 201 Created
{  "digital_line": {    "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  }}

Update Digital Line

  • PUT /api/v2/channels/voice/digital_lines/{digital_line_id}

Allowed For

  • Agents

Parameters

Name Type In Required Description
digital_line_id integer Path true ID of a digital line

Example body

{  "digital_line": {    "nickname": "Awesome Digital Line"  }}

Using curl

curl https://{subdomain}.zendesk.com/api/v2/channels/voice/digital_lines/{digital_line_id}.json \  -H "Content-Type: application/json" -d '{"digital_line": {"nickname": "Awesome Digital Line"}}' \  -v -u {email_address}:{password} -X PUT

Example response(s)

200 OK
Status 200 OK
{  "digital_line": {    "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  }}

Delete Digital Line

  • DELETE /api/v2/channels/voice/digital_lines/{digital_line_id}

Allowed For

  • Agents

Parameters

Name Type In Required Description
digital_line_id integer Path true ID of a digital line

Using curl

curl https://{subdomain}.zendesk.com/api/v2/channels/voice/digital_lines/{digital_line_id}.json \  -H "Content-Type: application/json" -X DELETE -v -u {email_address}:{password}

Example response(s)

200 OK
Status 200 OK
{  "status": "ok"}