Agent group details
Method to retrieve detailed information about an Agent Group in Liner by its identifier.
URL and method
GET /v2/agent-group/{id}/
id
Agent group identifier in Liner. Value> 0
Request example
<?php
$host = 'https://YOUR_LINER_API_HOST';
$token = 'YOUR_API_TOKEN';
$id = (int)$id;
$ch = curl_init($host . '/v2/agent-group/' . $id . '/');
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 id = Number(id);
const res = await fetch(`${host}/v2/agent-group/${id}/`, {
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,
"names": {
"ru": "Группа агентов",
"gb": "Agent group"
},
"agentIds": [101, 102],
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z"
}
}
Response fields
| Field | Type | Description |
|---|---|---|
id |
int |
Agent group identifier in Liner. |
names |
object |
Object containing agent group names in different languages. |
names.ru |
string |
Agent group name in Russian. |
names.gb |
string |
Agent group name in English. |
agentIds |
array<int> |
Array of agent identifiers assigned to the group. |
createdAt |
string |
Creation date and time (ISO 8601). |
updatedAt |
string |
Update date and time (ISO 8601). |
Note
The structure of the data field is described above. For the general API response format, see Request schema