Skip to content

Create employees

Creating employees

Method create.employees
Description Creating employees
Who has access Agent, Customer

Parameters of a request

Title Type Required Valid value Descriprion
access_token string yes Authentication session key
user_id number no Unique user ID of a customer or an agent who makes request.
Is mandatory for an agent
To get a list of customer users use the method "get.customer_users"
first_name string no Employee first name
last_name string yes Employee last name
patronymic string no Employee patronymic name
status enum no
  • available
  • break
  • do_not_disturb
  • not_at_workplace
  • not_at_work
  • unknown
Employee status
  • available - Available
  • break - On a break
  • do_not_disturb - Do not disturb
  • not_at_workplace - Not at workplace
  • not_at_work - Not at work
  • unknown - Unknown
allowed_in_call_types array no
  • internal
  • external
Types of incoming calls allowed to an employee
  • internal - internal calls to company's employees
  • external - external calls beyond the company
allowed_out_call_types array no
  • internal
  • external
Types of outgoing calls allowed to an employee
  • internal - internal calls to company's employees
  • external - external calls beyond the company
email string no Employees email
call_recording enum no
  • all - for all calls;
  • in - only incoming calls;
  • out - only outgoing calls;
  • off - switched off
Default value is "all". Status of call recording
Depends on the component "recording"
schedule_id number no Activity schedule
calls_available boolean no true, false
Parameter will be deleted shortly. Instead, use the parameters: allowed_in_call_types, allowed_out_call_types
Default value is "true". Availability for calls
Coach
coach object no Coach for an employee
Depends on the component "trainer"
coach_always_enabled boolean no true, false Default value is "false". As you enable this option, all emloyee's calls will also be duplicated for his or hers coach.
Value "true" can be set if the parameter "coach_id" is given.
coach_id number yes Coach unique ID
Groups an employee belongs to
groups array no List of unique IDs of groups an employee belongs to.
Phone numbers
phone_numbers array yes 10 List of employee's phone numbers.
It is important to know that when you create a new employee, his or hers number may already be attributed to another employee. In this case, when new parameters are set for this new number, they will be also updated for the existing number.
phone_number string yes Employee's phone number. Its format may allow extension dialing, such as "74955140578...2345", that is why the number may not comply with the standart E164.
If SIP already exists, we do not identify it with the number. Instead we just add the number as a PSTN number, i.e. a usual number.
channels_count number no from 1 to 150 Default value is "1". Number of phone lines.
dial_time number no From 1 to 100 Default value is "60". Time for dialing. Value is in seconds.
status enum no active, inactive Default value is "active". Phone number status.
Extension number
extension object no Employee's extension number
extension_phone_number string yes Maximum length is 5 Extension number
extension_voice_mail_enabled boolean no true, false Default value is "false".
In case all the numbers in an employee's phone numbers list are busy, a caller can leave a voice message.
extension_queue_enabled boolean no true, false Default value is "false".
In case all the numbers, attributed to an employee in a list, are busy, a caller can get in line for a redial to phone numbers in a list. Than, he or she will wait for the first number to become available.
Whether an employee is a chat operator or not
operator object not Workplace operator
Depends on the component "consultant"
operator_display_name string yes Operator's name as displayed in chats
operator_login string yes Operator's login for the app "Operator's workplace"
operator_password string yes Maximum length is 8 Operator's password for the app "Operator's workplace"
operator_position_id number no Employee's position
operator_offline_message_enabled boolean no true, false Default value is "false". Authorized to process offline messages or not
operator_invite_to_chat_enabled boolean no true, false Default value is "false". Authorized to invite to join chats or not
operator_chat_enabled boolean no true, false Default value is "true". Authorized to participate in chats with visitors or not
operator_sites array no List of websites unique IDs and addresses that have access to an employee.

Parameters of a reply

Title Type Required Description
id number yes Employee's unique ID

JSON request structure

{
  "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",
    "allowed_in_call_types": "array",
    "allowed_out_call_types": "array",
    "email":"string",
    "groups":[
      "group_id"
    ],
    "call_recording":"enum",
    "calls_available":"boolean",
    "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 reply structure

{
  "jsonrpc":"2.0",
  "id":"number",
  "result":{
    "id":"number"
  }
}

List of returning errors

Refer to "List of errors for methods with the verb create"