Para agentes de IA: markdown desta página — /docs-content-en/openlines/operators.md índice da documentação — /llms.txt

Os artigos da documentação estão disponíveis atualmente em inglês.

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 widgets.

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

Request fields (query)

Parameter Type Req. Description
configId number no Open Channel identifier. Source: GET /v1/openline-configs
configIdList number[] no List of Open Channels. Format: configIdList=3,5 or configIdList[]=3&configIdList[]=5
userId number no Operator identifier. Source: GET /v1/users
userIdList number[] no List of operators, in the same two forms
status string no Status: online, offline, or pause
hasFreeSlots boolean no Only operators with free slots. Accepts true/false and Y/N
limit number no Page size, 1..200 (default 50)
offset number no Pagination 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
operators Array of operators
operators[].userId The operator's user identifier
operators[].configId Open Channel identifier
operators[].status Status: online / offline / pause
operators[].activeSessions Number of active (open) sessions right now
operators[].maxChat The operator's chat limit (from the Open Channel settings)
operators[].freeSlots Free slots (maxChat − activeSessions)
operators[].lastActivityDate The operator's last activity date in the Open Channel
hasNextPage Whether 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
403 B24_TARIFF_RESTRICTION The Bitrix24 plan does not include Open Channels statistics (report_open_lines)
400 INVALID_PARAMS A non-numeric value in limit/offset or a list element
422 BITRIX_ERROR (error.b24Code: INVALID_FILTER) An invalid status value
422 BITRIX_ERROR (error.b24Code: OFFSET_TOO_LARGE) offset exceeds the maximum with a status/hasFreeSlots filter — narrow the filters
422 METHOD_NOT_YET_AVAILABLE The 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