# imopenlines.config.get

URL: https://chugunov.pro/api-bitrix24/imopenlines/openlines/imopenlines-config-get/
Проверено на Битрикс24 REST API, обновлено 11.09.2026 (ревизия источника fb39d6c).
Источник: официальная документация Битрикс24 (bitrix-tools/b24-rest-docs, лицензия MIT, © Bitrix). Справочник независимый, официальной документацией не является.

Получить открытую линию по идентификатору
Scope: `imopenlines`
Кто может выполнять метод: любой пользователь

## Описание

Метод `imopenlines.config.get` получает настройки открытой линии по идентификатору.

## Параметры

- `CONFIG_ID` `integer` — обязательный. Идентификатор открытой линии.
  Получить идентификатор открытой линии можно при [создании открытой линии](https://chugunov.pro/api-bitrix24/imopenlines/openlines/imopenlines-config-add/) или методом [получения списка открытых линий](https://chugunov.pro/api-bitrix24/imopenlines/openlines/imopenlines-config-list-get/)
- `WITH_QUEUE` `char` — необязательный. Возвращать данные очереди операторов. Возможные значения:
  - `Y` — да
  - `N` — нет
- `SHOW_OFFLINE` `char` — необязательный. Возвращать офлайн-операторов в очереди. Возможные значения:
  - `Y` — да
  - `N` — нет

## Ответ

HTTP-статус: 200

```json
{
    "result": {
        "ID": "22",
        "ACTIVE": "Y",
        "LINE_NAME": "Документация Битрикс24",
        "CRM": "N",
        "CRM_CREATE": "lead",
        "CRM_CREATE_SECOND": "0",
        "CRM_CREATE_THIRD": "Y",
        "CRM_FORWARD": "Y",
        "CRM_CHAT_TRACKER": "N",
        "CRM_TRANSFER_CHANGE": "Y",
        "CRM_SOURCE": "create",
        "QUEUE_TIME": "60",
        "NO_ANSWER_TIME": "60",
        "QUEUE_TYPE": "evenly",
        "CHECK_AVAILABLE": "Y",
        "WATCH_TYPING": "N",
        "WELCOME_BOT_ENABLE": "Y",
        "WELCOME_MESSAGE": "N",
        "WELCOME_MESSAGE_TEXT": "Добро пожаловать в открытую линию [b]«Документация Битрикс24»[/b][br]Вам ответит первый освободившийся оператор.",
        "VOTE_MESSAGE": "Y",
        "VOTE_TIME_LIMIT": "0",
        "VOTE_BEFORE_FINISH": "Y",
        "VOTE_CLOSING_DELAY": "Y",
        "VOTE_MESSAGE_1_TEXT": "Пожалуйста, оцените качество обслуживания.",
        "VOTE_MESSAGE_1_LIKE": "Спасибо за оценку!",
        "VOTE_MESSAGE_1_DISLIKE": "Очень жаль, что мы не смогли помочь вам, мы постараемся стать лучше.",
        "VOTE_MESSAGE_2_TEXT": "Пожалуйста, оцените качество обслуживания.\r\n\r\nОтправьте: 1 - хорошо, 0 - плохо",
        "VOTE_MESSAGE_2_LIKE": "Спасибо за оценку!",
        "VOTE_MESSAGE_2_DISLIKE": "Очень жаль, что мы не смогли помочь вам, мы постараемся стать лучше.",
        "AGREEMENT_MESSAGE": "N",
        "AGREEMENT_ID": "0",
        "CATEGORY_ENABLE": "N",
        "CATEGORY_ID": "0",
        "WELCOME_BOT_JOIN": "always",
        "WELCOME_BOT_ID": "597",
        "WELCOME_BOT_TIME": "180",
        "WELCOME_BOT_LEFT": "close",
        "NO_ANSWER_RULE": "text",
        "NO_ANSWER_FORM_ID": "0",
        "NO_ANSWER_BOT_ID": "0",
        "NO_ANSWER_TEXT": "К сожалению, в данный момент мы не можем вам ответить, мы обязательно с вами свяжемся.",
        "WORKTIME_ENABLE": "Y",
        "WORKTIME_FROM": "0",
        "WORKTIME_TO": "23.59",
        "WORKTIME_TIMEZONE": "Europe/Kaliningrad",
        "WORKTIME_HOLIDAYS": [
            ""
        ],
        "WORKTIME_DAYOFF": [
            ""
        ],
        "WORKTIME_DAYOFF_RULE": "text",
        "WORKTIME_DAYOFF_FORM_ID": "0",
        "WORKTIME_DAYOFF_BOT_ID": "0",
        "WORKTIME_DAYOFF_TEXT": "К сожалению, в данный момент мы не можем вам ответить.[br][br]Напишите свой вопрос и мы обязательно свяжемся с вами в рабочее время.",
        "CLOSE_RULE": "text",
        "CLOSE_FORM_ID": "0",
        "CLOSE_BOT_ID": "0",
        "CLOSE_TEXT": "Спасибо, что обратились к нам, пожалуйста, оцените качество обслуживания.",
        "FULL_CLOSE_TIME": "0",
        "AUTO_CLOSE_RULE": "none",
        "AUTO_CLOSE_FORM_ID": "0",
        "AUTO_CLOSE_BOT_ID": "0",
        "AUTO_CLOSE_TIME": "3600",
        "AUTO_CLOSE_TEXT": "",
        "AUTO_EXPIRE_TIME": "86400",
        "DATE_CREATE": {},
        "DATE_MODIFY": {},
        "MODIFY_USER_ID": "27",
        "TEMPORARY": "N",
        "XML_ID": null,
        "LANGUAGE_ID": "ru",
        "QUICK_ANSWERS_IBLOCK_ID": "181",
        "SESSION_PRIORITY": "0",
        "TYPE_MAX_CHAT": "answered_new",
        "MAX_CHAT": "0",
        "OPERATOR_DATA": "profile",
        "DEFAULT_OPERATOR_DATA": [],
        "KPI_FIRST_ANSWER_TIME": "0",
        "KPI_FIRST_ANSWER_ALERT": "N",
        "KPI_FIRST_ANSWER_LIST": null,
        "KPI_FIRST_ANSWER_TEXT": "Сотрудник #OPERATOR# превысил допустимое время ответа клиенту на первое сообщение. Диалог №#DIALOG#.",
        "KPI_FURTHER_ANSWER_TIME": "0",
        "KPI_FURTHER_ANSWER_ALERT": "N",
        "KPI_FURTHER_ANSWER_LIST": null,
        "KPI_FURTHER_ANSWER_TEXT": "Сотрудник #OPERATOR# превысил допустимое время ответа клиенту на сообщение. Диалог №#DIALOG#.",
        "KPI_CHECK_OPERATOR_ACTIVITY": "N",
        "SEND_NOTIFICATION_EMPTY_QUEUE": "N",
        "USE_WELCOME_FORM": "N",
        "WELCOME_FORM_ID": "111",
        "WELCOME_FORM_DELAY": "Y",
        "SEND_WELCOME_EACH_SESSION": "Y",
        "CONFIRM_CLOSE": "Y",
        "IGNORE_WELCOME_FORM_RESPONSIBLE": "N",
        "QUEUE": [
            "27",
            "103"
        ],
        "QUEUE_FULL": {
            "27": {
                "ID": "245",
                "SORT": "0",
                "USER_ID": "27",
                "DEPARTMENT_ID": "0",
                "USER_NAME": null,
                "USER_WORK_POSITION": null,
                "USER_AVATAR": null,
                "USER_AVATAR_ID": "0"
            },
            "103": {
                "ID": "251",
                "SORT": "1",
                "USER_ID": "103",
                "DEPARTMENT_ID": "0",
                "USER_NAME": null,
                "USER_WORK_POSITION": null,
                "USER_AVATAR": null,
                "USER_AVATAR_ID": "0"
            }
        },
        "QUEUE_USERS_FIELDS": {
            "27": {
                "USER_NAME": null,
                "USER_WORK_POSITION": null,
                "USER_AVATAR": null,
                "USER_AVATAR_ID": "0"
            },
            "103": {
                "USER_NAME": null,
                "USER_WORK_POSITION": null,
                "USER_AVATAR": null,
                "USER_AVATAR_ID": "0"
            }
        },
        "QUEUE_ONLINE": "Y"
    },
    "time": {
        "start": 1773663905,
        "finish": 1773663905.742784,
        "duration": 0.7427840232849121,
        "processing": 0,
        "date_start": "2026-03-16T15:25:05+03:00",
        "date_finish": "2026-03-16T15:25:05+03:00",
        "operating_reset_at": 1773664505,
        "operating": 0
    }
}
```

### Возвращаемые данные

- `result` `object`. Значение результата. Возможные значения:
  - `object` — объект с настройками открытой линии [(подробное описание)](#result)
  - `false` — линия с указанным `CONFIG_ID` не существует
- `time` `time`. Информация о времени выполнения запроса

## Ошибки

HTTP-статус: 400

```json
{
    "error": "CONFIG_ID_EMPTY",
    "error_description": "Config ID can't be empty"
}
```

- `400` — `CONFIG_ID_EMPTY`. Config ID can't be empty

## Примеры запроса

### cURL (Webhook)

```bash
curl -X POST \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "CONFIG_ID": 15,
    "WITH_QUEUE": "Y",
    "SHOW_OFFLINE": "Y"
  }' \
  https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/imopenlines.config.get
```

### cURL (OAuth)

```bash
curl -X POST \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "CONFIG_ID": 15,
    "WITH_QUEUE": "Y",
    "SHOW_OFFLINE": "Y",
    "auth": "**put_access_token_here**"
  }' \
  https://**put_your_bitrix24_address**/rest/imopenlines.config.get
```

### JS (TS)

```ts
// This snippet is an ES module: top-level await requires type="module" or a bundler.
// $b24 is an already-initialized SDK instance (see the SDK "Get started" guide).
import { Text } from '@bitrix24/b24jssdk'
import type { B24Frame } from '@bitrix24/b24jssdk'

declare const $b24: B24Frame

// Shape of the payload returned in result (match the "response handling" section of the page)
type ConfigGetResult = {
  ID: string,
  LINE_NAME: string,
  ACTIVE: string,
  CRM: string,
  QUEUE_TYPE: string,
  QUEUE_TIME: string,
  NO_ANSWER_TIME: string,
  WORKTIME_ENABLE: string,
  WORKTIME_TIMEZONE: string,
  WELCOME_BOT_ENABLE: string,
  QUEUE: string[],
  QUEUE_ONLINE: string,
}

try {
  const response = await $b24.actions.v2.call.make<ConfigGetResult>({
    method: 'imopenlines.config.get',
    params: {
      CONFIG_ID: 15,
      WITH_QUEUE: 'Y',
      SHOW_OFFLINE: 'Y',
    },
    requestId: Text.getUuidRfc4122()
  })

  // The payload is available only on a successful response
  if (!response.isSuccess) {
    console.error(response.getErrorMessages().join('; '))
  } else {
    const result = response.getData()!.result
    console.info(result.ID, result.LINE_NAME, result.ACTIVE, result.QUEUE_ONLINE)
  }
} catch (error) {
  // Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
  console.error(error)
}
```

### JS (UMD)

```html
<!-- Load the SDK (UMD build); it is exposed as the global B24Js -->
<script src="https://unpkg.com/@bitrix24/b24jssdk@1/dist/umd/index.min.js"></script>
<script>
  async function getOpenlinesConfig() {
    try {
      // Initialize the SDK inside a Bitrix24 frame
      const $b24 = await B24Js.initializeB24Frame()

      const response = await $b24.actions.v2.call.make({
        method: 'imopenlines.config.get',
        params: {
          CONFIG_ID: 15,
          WITH_QUEUE: 'Y',
          SHOW_OFFLINE: 'Y',
        },
        requestId: B24Js.Text.getUuidRfc4122()
      })

      // The payload is available only on a successful response
      if (!response.isSuccess) {
        console.error(response.getErrorMessages().join('; '))
        return
      }

      const result = response.getData().result
      console.info(result.ID, result.LINE_NAME, result.ACTIVE, result.QUEUE_ONLINE)
    } catch (error) {
      // Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
      console.error(error)
    }
  }

  document.addEventListener('DOMContentLoaded', getOpenlinesConfig)
</script>
```

### Python

```python
from b24pysdk.errors import BitrixAPIError, BitrixSDKException

try:
    bitrix_response = client.imopenlines.config.get(
        config_id=15,
        with_queue=True,
        show_offline=True,
    ).response
    result = bitrix_response.result
    print(result)
except BitrixAPIError as error:
    print(
        "Ошибка Bitrix API",
        f"error: {error.error}",
        f"error_description: {error.error_description}",
        sep="\n",
    )
except BitrixSDKException as error:
    print(f"Ошибка Bitrix SDK: {error.message}")
except Exception as error:
    print(f"Непредвиденная ошибка: {error}")
```

### PHP

```php
try {
    $response = $b24Service
        ->core
        ->call(
            'imopenlines.config.get',
            [
                'CONFIG_ID' => 15,
                'WITH_QUEUE' => 'Y',
                'SHOW_OFFLINE' => 'Y',
            ]
        );

    $result = $response
        ->getResponseData()
        ->getResult();

    print_r($result);
} catch (Throwable $e) {
    echo $e->getMessage();
}
```

### BX24.js

```js
BX24.callMethod(
    'imopenlines.config.get',
    {
        CONFIG_ID: 15,
        WITH_QUEUE: 'Y',
        SHOW_OFFLINE: 'Y'
    },
    function(result)
    {
        if (result.error())
        {
            console.error(result.error());
        }
        else
        {
            console.log(result.data());
        }
    }
);
```

### PHP CRest

```php
require_once('crest.php');

$result = CRest::call(
    'imopenlines.config.get',
    [
        'CONFIG_ID' => 15,
        'WITH_QUEUE' => 'Y',
        'SHOW_OFFLINE' => 'Y',
    ]
);

print_r($result);
```

### Go

```go
// client и ctx уже созданы — см. раздел «SDK для Go»
res, err := client.Core().Call(ctx, "imopenlines.config.get", b24.Params{
	"CONFIG_ID":    15,
	"WITH_QUEUE":   "Y",
	"SHOW_OFFLINE": "Y",
}, b24.WithIdempotent())
if err != nil {
	return fmt.Errorf("imopenlines.config.get: %w", err)
}

var item struct {
	ID              b24.ID `json:"ID"`
	Active          string `json:"ACTIVE"`
	LineName        string `json:"LINE_NAME"`
	CRM             string `json:"CRM"`
	CRMCreate       string `json:"CRM_CREATE"`
	CRMCreateSecond string `json:"CRM_CREATE_SECOND"`
}
if err := json.Unmarshal(res.Result, &item); err != nil {
	return fmt.Errorf("разбор ответа: %w", err)
}
fmt.Println(item.ID, item.Active)
```

Оригинал в официальной документации: https://apidocs.bitrix24.ru/api-reference/imopenlines/openlines/imopenlines-config-get.html
