Skip to content

Retrieves employees.

Retrieves employees

Method get.employees
API version
Description Retrieves employees.

Available to: Agents and clients

Request parameters

Name Type Required Description
access_token string yes Access token used to authenticate the request.
user_id number no Unique ID of the client user on whose behalf the agent is making the request. Required for agents. To retrieve a list of client users, use "get.customer_users".
limit number no Maximum number of records to return. See the "Paging" section.
offset number no Number of records to skip before returning results. Default: 0. See the "Paging" section.
filter object no Filtering criteria. See the "Filters" section.
fields array no Fields to include in the response. See the "Viewing returned data" section.
sort array no Sorting criteria. See the "Data sorting" section.

Response parameters

Name Type Valid values Filtering Sorting Description
id number yes Unique employee ID.
login string yes yes Login used to access the CallGear account.
first_name string yes yes Employee's first name.
last_name string yes yes Employee's last name.
patronymic string yes Employee's middle name.
full_name string yes yes Employee's full name: last name, first name, and middle name.
status enum available - available; break - on break; do_not_disturb - do not disturb; not_at_workplace - out of the office; not_at_work - not working; auto_out_call - on an outbound call; unknown - unknown yes Deprecated and scheduled for removal. Use status_id instead. Returned only when the employee has a standard status selected.
status_id number yes Unique status ID. Use get.statuses to retrieve available statuses.
calls_available boolean true, false yes yes Deprecated and scheduled for removal. Use in_external_allowed_call_directions and in_internal_allowed_call_directions instead. Indicates whether the employee is available for calls.
allowed_in_call_types array internal - calls from employees; external - calls from customers yes Deprecated and scheduled for removal. Use in_external_allowed_call_directions and in_internal_allowed_call_directions instead. Types of incoming calls the employee may receive.
in_external_allowed_call_directions array in - inbound; out - outbound yes Allowed directions for incoming external calls.
in_internal_allowed_call_directions array in - inbound; out - outbound yes Allowed directions for incoming internal calls.
allowed_out_call_types array internal - calls to employees; external - calls outside the company yes Deprecated and scheduled for removal. Use out_external_allowed_call_directions and out_internal_allowed_call_directions instead. Types of outgoing calls the employee may place.
out_external_allowed_call_directions array in - inbound; out - outbound yes Allowed directions for outgoing external calls.
out_internal_allowed_call_directions array in - inbound; out - outbound yes Allowed directions for outgoing internal calls.
email string yes Employee email address.
call_recording enum all - all calls; in - inbound calls only; out - outbound calls only; off - disabled yes Call-recording mode.
schedule_id number yes Unique ID of the employee's work schedule.
schedule_name string yes Name of the employee's work schedule.
Coaching
coach object yes Coaching settings for the employee.
coach_full_name string Coach's full name.
coach_id number Unique ID of the employee assigned as the coach.
coach_always_enabled boolean true, false Whether all incoming calls to the employee are mirrored to the coach.
Employee groups
groups array yes Groups the employee belongs to.
group_id number Unique employee group ID.
group_name string Employee group name.
Phone numbers
phone_numbers array Maximum: 10 entries yes Employee phone numbers, ordered by dialing priority.
phone_id number Unique employee phone number ID.
phone_number string Employee phone number. The value may include an extension, for example "74955140578...2345", and therefore does not have to follow E.164. SIP values are stored as PSTN-type phone numbers.
channels_count number 1 to 150 Number of concurrent channels for the phone. Default: 1.
dial_time number 1 to 100 Ringing duration, in seconds. Default: 60.
status enum active, inactive Phone number status. Default: active.
Extension
extension object yes Employee extension settings.
extension_phone_number string Maximum length: 5 characters Employee extension number.
extension_voice_mail_enabled boolean Whether callers are prompted to leave a voicemail when all of the employee's phone numbers are busy.
extension_queue_enabled boolean Whether callers wait in a queue until one of the employee's phone numbers becomes available.
Chat operator settings
operator object Chat operator settings.
operator_display_name string Display name shown in chats.
operator_login string Login used to access the Operator Workspace.
operator_position_id number Unique ID of the position shown in the operator signature.
operator_position_name string Position name shown in the operator signature.
operator_offline_message_enabled boolean Whether the operator may handle offline messages.
operator_invite_to_chat_enabled boolean Whether the operator may invite visitors to a chat.
operator_chat_enabled boolean Whether the operator may participate in visitor chats.
operator_chats_available booleantrue, false Whether the operator is currently available for chats.
Sites
operator_sites array Sites where the operator is available.
site_id number Unique site ID.
site_domain_name string Site domain name, without the http:// or https:// protocol.

Example request

{
  "jsonrpc":"2.0",
  "id":"number",
  "method":"get.employees",
  "params":{
    "access_token":"string",
    "user_id":"number",
    "offset":"number",
    "limit":"number",
    "filter":{
    },
    "sort":[
      {
        "field":"string",
        "order":"string"
      }
    ],
    "fields":[
      "string"
    ]
  }
}

Example response

{
  "jsonrpc":"2.0",
  "id":"number",
  "result":{
    "metadata":{
    },
    "data":[
      {
        "id":"number",
        "first_name":"string",
        "login":"string",
        "last_name":"string",
        "patronymic":"string",
        "full_name":"string",
        "email":"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",
        "groups":[
          {
            "group_id":"number",
            "group_name":"string"
          }
        ],
        "call_recording":"enum",
        "schedule_id":"number",
        "schedule_name":"string",
        "coach":{
          "coach_id":"number",
          "coach_full_name":"string",
          "coach_always_enabled":"boolean"
        },
        "phone_numbers":[
          {
            "phone_id": "integer",
            "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_position_id":"number",
          "operator_position_name":"string",
          "operator_offline_message_enabled":"boolean",
          "operator_invite_to_chat_enabled":"boolean",
          "operator_chat_enabled":"boolean",
          "operator_chats_available":"boolean",
          "operator_sites":[
            {
              "site_id":"number",
              "site_domain_name":"string"
            }
          ]
        }
      }
    ]
  }
}

Possible errors

See the "Errors for get methods" section.