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.
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. Use this id when integrating with the Web Widget to enable calling. See the Web Widget API Reference
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}
// 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,"line_id":"56e4cf3a49112b3494b3b70f0506bdfa","line_type":"digital","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"}}
var axios =require('axios');var data =JSON.stringify({"digital_line":{"group_ids":[1],"nickname":"Awesome Digital Line"}});var config ={ method:'POST', url:'https://support.zendesk.com/api/v2/channels/voice/digital_lines', headers:{'Content-Type':'application/json','Authorization':'Basic <auth-value>',// Base64 encoded "{email_address}/token:{api_token}"}, data : data,};axios(config).then(function(response){console.log(JSON.stringify(response.data));}).catch(function(error){console.log(error);});
// 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,"line_id":"56e4cf3a49112b3494b3b70f0506bdfa","line_type":"digital","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"}}
Code Samples
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}/token:{api_token} -X PUT
var axios =require('axios');var data =JSON.stringify({"digital_line":{"nickname":"Awesome Digital Line"}});var config ={ method:'PUT', url:'https://support.zendesk.com/api/v2/channels/voice/digital_lines/1', headers:{'Content-Type':'application/json','Authorization':'Basic <auth-value>',// Base64 encoded "{email_address}/token:{api_token}"}, data : data,};axios(config).then(function(response){console.log(JSON.stringify(response.data));}).catch(function(error){console.log(error);});
// 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,"line_id":"56e4cf3a49112b3494b3b70f0506bdfa","line_type":"digital","nickname":"Awesome Support Line","recorded":true,"transcription":false}}