User List
Method for retrieving a list of users.
Endpoint and method
GET /v2/user/list/
Parameters
accessGroupstringoptional
Filter by user access group. Available values:client,call-center,call-center-senior,arbitration,moderator,admin.
isActivebooloptional
Filter by user activity.
offsetintoptional
Pagination parameter. Specifies the offset from which the selection starts. Default is 0.
limitintoptional
Pagination parameter. Number of items returned per request. Maximum value is 100. Default is 50.
Request example
<?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",
"email": "[email protected]",
"isActive": true,
"accessGroup": "call-center",
"webRtcIsEnabled": true,
"interfaceLanguageCode": "ru",
"languageSkillsCode": ["ru"],
"autoAnswer": 0,
"phoneMode": "default",
"avatar": "https://YOUR_LINER_HOST/public/assets/img/placeholders/liner-user.jpg",
"telegramNotificationsEnabled": false,
"telegramChatId": null,
"telegramNotificationsPriority": null,
"emailNotificationsEnabled": false,
"emailNotificationsPriority": null,
"lastLoginAt": "2024-01-01 00:00:00",
"lastActivityAt": "2024-01-01 00:00:00",
"createdAt": "2024-01-01T00:00:00+03:00"
}
],
"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 | null |
User first name. |
lastName |
string | null |
User last 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. An empty string means no group is assigned. |
webRtcIsEnabled |
bool |
Whether telephony is enabled for the user. |
interfaceLanguageCode |
string |
User interface language code. Available values: ru, gb. |
languageSkillsCode |
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. |
avatar |
string |
User avatar URL. A placeholder image URL is returned when no avatar is set. |
telegramNotificationsEnabled |
bool |
Whether Telegram notifications are enabled. |
telegramChatId |
string | null |
Telegram chat ID for notifications. |
telegramNotificationsPriority |
string | null |
Telegram notification priority. Available values: null, urgent. |
emailNotificationsEnabled |
bool |
Whether email notifications are enabled. |
emailNotificationsPriority |
string | null |
Email notification priority. Available values: null, urgent. |
lastLoginAt |
string | null |
Last login date and time in yyyy-mm-dd hh:mm:ss format. null if the user has never logged in. |
lastActivityAt |
string | null |
Last activity date and time in yyyy-mm-dd hh:mm:ss format. |
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