Skip to content

User Details

Method for retrieving detailed information about a user in Liner by their identifier.


Endpoint and method

GET /v2/user/detail/{userId}/

userId
User identifier in Liner. Value > 0


Request example

curl -X GET "https://YOUR_LINER_API_HOST/v2/user/detail/{userId}" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_TOKEN"
<?php

$host = 'https://YOUR_LINER_API_HOST';
$token = 'YOUR_API_TOKEN';
$userId = (int)$userId;

$ch = curl_init($host . '/v2/user/detail/' . $userId);
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 userId = Number(userId);

const res = await fetch(`${host}/v2/user/detail/${userId}`, {
  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": {
    "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"
  }
}

Response fields

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