لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/openlines/operators.md فهرس التوثيق — /llms.txt

مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.

Operators (real-time)

The method ships in the imopenlines 26.700.0 update and is not yet available on all Bitrix24 accounts. If the update has not reached your Bitrix24 account yet, the API returns 422 METHOD_NOT_YET_AVAILABLE — this means the method has not been released on the account yet, not that the integration is broken.

GET /v1/openlines/operators

A list of Open Channel operators with their current status and load — for real-time contact-center monitoring dashboards.

The data is near-real-time: status and the active-session counter are read separately, not in a single transaction. For a monitoring dashboard, poll the method no more than once every 30 seconds.

Request fields (query)

Parameter Type Required Description
ParameterconfigId Typenumber Requiredno DescriptionOpen Channel identifier. Source: GET /v1/openline-configs
ParameterconfigIdList Typenumber[] Requiredno DescriptionList of Open Channels. Format: configIdList=3,5 or configIdList[]=3&configIdList[]=5
ParameteruserId Typenumber Requiredno DescriptionOperator identifier. Source: GET /v1/users
ParameteruserIdList Typenumber[] Requiredno DescriptionList of operators, in the same two forms
Parameterstatus Typestring Requiredno DescriptionStatus: online, offline, or pause
ParameterhasFreeSlots Typeboolean Requiredno DescriptionOnly operators who have free chat slots. Accepts true/false and Y/N
Parameterlimit Typenumber Requiredno DescriptionPage size, 1..200 (default 50)
Parameteroffset Typenumber Requiredno DescriptionPagination offset (default 0)

List parameters accept either a comma-separated string (configIdList=3,5) or the repeated bracket form (configIdList[]=3&configIdList[]=5). Repeating the parameter without brackets (configIdList=3&configIdList=5) is not supported.

Examples

curl — personal key

Terminal
curl "https://vibecode.bitrix24.com/v1/openlines/operators?configId=3&status=online" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl "https://vibecode.bitrix24.com/v1/openlines/operators?configId=3&status=online" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/openlines/operators?configId=3&status=online', {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const { data } = await res.json()

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/openlines/operators?configId=3&status=online', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})
const { data } = await res.json()

Response fields

The response is { "success": true, "data": { "operators": [...], "hasNextPage": bool } }.

Key Description
Keyoperators DescriptionArray of operators
Keyoperators[].userId DescriptionThe operator's user identifier
Keyoperators[].configId DescriptionOpen Channel identifier
Keyoperators[].status DescriptionStatus: online / offline / pause
Keyoperators[].activeSessions DescriptionNumber of active (open) sessions right now
Keyoperators[].maxChat DescriptionThe operator's chat limit (from the Open Channel settings)
Keyoperators[].freeSlots DescriptionNumber of free chat slots (maxChat − activeSessions)
Keyoperators[].lastActivityDate DescriptionThe operator's last activity date in the Open Channel
KeyhasNextPage DescriptionWhether there is a next page

Response example

JSON
{
  "success": true,
  "data": {
    "operators": [
      { "userId": 42, "configId": 3, "status": "online", "activeSessions": 2, "maxChat": 5, "freeSlots": 3, "lastActivityDate": "2026-06-15T15:01:00+00:00" },
      { "userId": 51, "configId": 3, "status": "pause", "activeSessions": 0, "maxChat": 5, "freeSlots": 5, "lastActivityDate": "2026-06-15T14:20:00+00:00" }
    ],
    "hasNextPage": false
  }
}

Error response example

422 — an invalid status value (the value is passed to Bitrix24, which rejects the filter):

JSON
{
  "success": false,
  "error": { "code": "BITRIX_ERROR", "message": "Invalid filter value", "b24Code": "INVALID_FILTER" }
}

Errors

HTTP Code When
HTTP403 CodeB24_TARIFF_RESTRICTION WhenThe Bitrix24 plan does not include Open Channels statistics (report_open_lines)
HTTP400 CodeINVALID_PARAMS WhenA non-numeric value in limit/offset or a list element
HTTP422 CodeBITRIX_ERROR (error.b24Code: INVALID_FILTER) WhenAn invalid status value
HTTP422 CodeBITRIX_ERROR (error.b24Code: OFFSET_TOO_LARGE) Whenoffset exceeds the maximum with a status/hasFreeSlots filter — narrow the filters
HTTP422 CodeMETHOD_NOT_YET_AVAILABLE WhenThe imopenlines 26.700.0 update has not reached the portal yet. The response contains an error.release field set to imopenlines 26.700.0

The full list of system codes — API errors.

See also