Method create.employees
Description Creating an employee
Available to Agent, Client

Request parameters

Name Type Required Valid values Description
access_token string yes Authentication session key
user_id number no Unique user identifier of the agent client on behalf of which the request is made
Is required for the agent
To obtain a list of client users, you must use the method "get.customer_users"
first_name string no Employee name
last_name string yes Employee last name
patronymic string no Employee's middle name
status enum no
  • available
  • break
  • do_not_disturb
  • not_at_workplace
  • not_at_work
  • unknown
Employee status
  • available - Available
  • break - Break
  • do_not_disturb - Do not disturb
  • not_at_workplace - Out of office
  • not_at_work - Not at work
  • unknown - Unknown
calls_available boolean no true, false
The parameter will be removed shortly. Use the parameters instead: in_external_allowed_call_directions, in_internal_allowed_call_directions
The default value is "true". Availability for calls
allowed_in_call_types array no
  • internal
  • external
The parameter will be removed shortly. Use the parameters instead: in_external_allowed_call_directions, in_internal_allowed_call_directions
What types of incoming calls are allowed to an employee?
  • internal - internal calls from company employees
  • external - external calls from clients
in_external_allowed_call_directions array no
  • in
  • out
What call directions are an employee allowed for incoming external calls?
  • in - incoming calls
  • out - outgoing calls
in_internal_allowed_call_directions array no
  • in
  • out
What call directions are an employee allowed for incoming internal calls?
  • in - incoming calls
  • out - outgoing calls
allowed_out_call_types array no
  • internal
  • external
The parameter will be removed shortly. Use the parameters instead: out_external_allowed_call_directions, out_internal_allowed_call_directions
What types of outgoing calls are allowed to an employee?
  • internal - internal calls to company employees
  • external - calls outside the company
out_external_allowed_call_directions array no
  • in
  • out
What call directions are an employee allowed for outgoing external calls?
  • in - incoming calls
  • out - outgoing calls
out_internal_allowed_call_directions array no
  • in
  • out
What call directions are an employee allowed for outgoing internal calls?
  • in - incoming calls
  • out - outgoing calls
email string no Employee email address
call_recording enum no
  • all - for everyone calls;
  • in - only for inbox;
  • out - only for outgoing;
  • off - disabled
The default value is "all". Call recording status
Depends on the "recording" component
schedule_id number no Activity graph
Trainer
coach object no Trainer for an employee
Depends on the component "trainer"
coach_always_enabled boolean no true, false By default "false". When this option is activated, all incoming calls employee will be duplicated to his trainer.
The "true" value can be set if specified parameter "coach_id".
coach_id number yes Unique trainer identifier
Groups in which the employee belongs
groups array no List of unique identifiers of groups in which it belongs employee
Phones
phone_numbers array no 10 pieces Employee phone list
It is important to understand that when creating a new employee the number may already exist with another employee and if new parameters are passed to the number, they will be also updated an existing number
phone_number string yes Employee phone number. The number format can be with additional dialing, for example "74955140578...2345", so the number does not E164 format
If SIP is specified, then we do not make connections, but simply add as a PSTN type number, i.e. like a regular number
channels_count number no From 1 to 150 The default value is "1". Number of lines on the phone.
dial_time number no From 1 to 100 The default value is "60". Phone call time. Value in seconds.
status enum no active, inactive The default value is "active". Number status.
Internal number
extension object no Employee internal number
extension_phone_number string yes Maximum length 5 Extension number
extension_voice_mail_enabled boolean no true, false Default value "false".
If all numbers specified for this employee in phone list is busy, then the caller will prompted to leave a voice message.
extension_queue_enabled boolean no true, false Default value "false".
If all numbers specified for this employee in phone list is busy, the caller will be put in a queue to redial the phones in the list and will wait for the first one vacant number.
Is the employee a chat operator
operator object no Workplace operator
Depends on the component "consultant"
operator_display_name string yes Operator name in chat
operator_login string yes Employee login to enter the Workplace application operator"
operator_password string yes Minimum length 8 Employee password for logging into the Workplace application operator"
operator_position_id number no Employee position in signature
operator_offline_message_enabled boolean no true, false The default value is "false". Is it allowed to process applications
operator_invite_to_chat_enabled boolean no true, false The default value is "false". Is it allowed to invite to chat
operator_chat_enabled boolean no true, false The default value is "true". Is it allowed to participate in chats with visitors
operator_sites array no List of unique site identifiers for which it is available employee

Response parameters

Title Type Required Description
id number yes Unique employee identifier

JSON request structure```json

{ "jsonrpc":"2.0", "id":"number", "method":"create.employees", "params":{ "access_token":"string", "user_id":"number", "first_name":"string", "last_name":"string", "patronymic":"string", "status": "enum", "calls_available":"boolean", "allowed_in_call_types": "array", "in_external_allowed_call_directions": "array", "in_internal_allowed_call_directions": "array", "allowed_out_call_types": "array", "out_external_allowed_call_directions": "array", "out_internal_allowed_call_directions": "array", "email":"string", "groups":[ "group_id" ], "call_recording":"enum", "schedule_id":"number", "coach":{ "coach_always_enabled":"boolean", "coach_id":"number" }, "phone_numbers":[ { "phone_number":"string", "channels_count":"number", "dial_time":"number", "status":"enum" } ], "extension":{ "extension_phone_number":"string", "extension_voice_mail_enabled":"boolean", "extension_queue_enabled":"boolean" }, "operator":{ "operator_login":"string", "operator_display_name": "string", "operator_password":"string", "operator_position_id":"number", "operator_offline_message_enabled":"boolean", "operator_invite_to_chat_enabled":"boolean", "operator_chat_enabled":"boolean", "operator_sites":[ "site_id" ] } } }

### JSON response structure```json
{
  "jsonrpc":"2.0",
  "id":"number",
  "result":{
    "id":"number"
  }
}

List of returned errors

See the section "List of errors for methods with the create verb"