Skip to content

User List

Method for retrieving a list of users.


Endpoint and method

GET /v2/user/list/


Parameters

accessGroup string optional
Filter by user access group. Available values: client, call-center, call-center-senior, arbitration, moderator, admin.

isActive bool optional
Filter by user activity.

offset int optional
Pagination parameter. Specifies the offset from which the selection starts. Default is 0.

limit int optional
Pagination parameter. Number of items returned per request. Maximum value is 100. Default is 50.


Request example

curl -X GET "https://YOUR_LINER_API_HOST/v2/user/list/?accessGroup=call-center&isActive=1&offset=0&limit=50" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_TOKEN"
<?php

$host = 'https://YOUR_LINER_API_HOST';
$token = 'YOUR_API_TOKEN';

$query = http_build_query([
    'accessGroup' => 'call-center',
    'isActive' => 1,
    'offset' => 0,
    'limit' => 50,
]);

$ch = curl_init($host . '/v2/user/list/?' . $query);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
        'X-Api-Key: ' . $token,
    ],
    CURLOPT_TIMEOUT => 15,
]);

$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

if ($response === false) {
    throw new RuntimeException('cURL error: ' . curl_error($ch));
}

curl_close($ch);

echo "HTTP {$httpCode}\n";
echo $response;
const host = "https://YOUR_LINER_API_HOST";
const token = "YOUR_API_TOKEN";

const params = new URLSearchParams();
params.set("accessGroup", "call-center");
params.set("isActive", "1");
params.set("offset", "0");
params.set("limit", "50");

const res = await fetch(`${host}/v2/user/list/?${params.toString()}`, {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "X-Api-Key": token
  }
});

const data = await res.json();
console.log("HTTP", res.status, data);

Response example

{
  "success": true,
  "message": "",
  "data": {
    "list": [
      {
        "id": 123,
        "name": "John",
        "lastName": "Doe",
        "secondName": null,
        "email": "[email protected]",
        "isActive": true,
        "accessGroup": "call-center",
        "webRtcEnabled": true,
        "interfaceLanguageCode": "ru",
        "languageSkillCodes": ["ru"],
        "autoAnswer": 0,
        "phoneMode": "default",
        "avatarUrl": null,
        "telegramNotificationsEnabled": false,
        "telegramChatId": null,
        "telegramNotificationsType": null,
        "emailNotificationsEnabled": false,
        "emailNotificationsType": null,
        "lastLoginAt": "2024-01-01T00:00:00Z",
        "lastActivityAt": "2024-01-01T00:00:00Z",
        "createdAt": "2024-01-01T00:00:00Z"
      }
    ],
    "next": 50,
    "total": 12345
  }
}

Response fields

Fields in data

Field Type Description
list array List of users.
next int Offset to use for the next request.
total int Total number of users.

Fields in list

Field Type Description
id int User identifier in Liner.
name string User first name.
lastName string User last name.
secondName string | null User middle name.
email string User email.
isActive bool Whether the user is active.
accessGroup string User access group. Available values: client, call-center, call-center-senior, arbitration, moderator, admin.
webRtcEnabled bool Whether telephony is enabled for the user.
interfaceLanguageCode string User interface language code. Available values: ru, gb.
languageSkillCodes array Language codes the user speaks. Allowed item values: ru, gb.
autoAnswer int Settings for auto-answer. Possible values range from -1 to 10, where -1 means Instant, 0 means Disabled, and all other values specify the number of seconds before auto-answer.
phoneMode string User telephony mode. Available values: default, outgoing-only, incoming-only, predictive.
avatarUrl string | null User avatar URL.
telegramNotificationsEnabled bool Whether Telegram notifications are enabled.
telegramChatId string | null Telegram chat ID for notifications.
telegramNotificationsType string | null Telegram notification type. Available values: null, urgent.
emailNotificationsEnabled bool Whether email notifications are enabled.
emailNotificationsType string | null Email notification type. Available values: null, urgent.
lastLoginAt string Last login date and time (ISO 8601).
lastActivityAt string Last activity date and time (ISO 8601).
createdAt string User creation date and time (ISO 8601).

Note

The structure of the data field is described above. For the overall API response format, see Request Schema