# crm.settings.mode.get

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

Определить текущий режим работы CRM
Scope: `crm`
Кто может выполнять метод: любой пользователь

## Описание

Метод возвращает текущие настройки режима работы CRM: **классический режим CRM** (с лидами) или **простой режим CRM** (без лидов).

Этот режим влияет на целый ряд сценариев работы CRM и для лучшего понимания мы рекомендуем прочитать [соответствующую статью](https://helpdesk.bitrix24.ru/open/17611420/) пользовательской документации.

## Ответ

HTTP-статус: 200

```json
{
    "result": 1,
    "time": {
        "start": 1715091541.642592,
        "finish": 1715091541.730599,
        "duration": 0.08800697326660156,
        "date_start": "2024-05-03T17:19:01+03:00",
        "date_finish": "2024-05-03T17:19:01+03:00",
        "operating": 0
    }
}
```

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

- `result` `integer`. Возвращает значение, определённое в [crm.enum.settings.mode](https://chugunov.pro/api-bitrix24/crm/auxiliary/enum/crm-enum-settings-mode/)
- `time` `time`. Информация о времени выполнения запроса

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

### cURL (Webhook)

```bash
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/crm.settings.mode.get
```

### cURL (OAuth)

```bash
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/crm.settings.mode.get
```

### JS

```js
try
{
	const response = await $b24.callMethod(
		'crm.settings.mode.get',
		{}
	);
	
	const result = response.getData().result;
	if (result.error())
	{
		console.error(result.error());
	}
	else
	{
		console.dir(result);
	}
}
catch( error )
{
	console.error('Error:', error);
}
```

### Python

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

try:
    bitrix_response = client.crm.settings.mode.get().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(
            'crm.settings.mode.get',
            []
        );

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

    if ($result->error()) {
        error_log($result->error());
    } else {
        echo 'Success: ' . print_r($result->data(), true);
    }

} catch (Throwable $e) {
    error_log($e->getMessage());
    echo 'Error getting CRM settings mode: ' . $e->getMessage();
}
```

### BX24.js

```js
BX24.callMethod("crm.settings.mode.get", {}, result => {
    if (result.error())
        console.error(result.error());
    else
        console.dir(result.data());
});
```

### PHP CRest

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

$result = CRest::call(
    'crm.settings.mode.get',
    []
);

echo '<PRE>';
print_r($result);
echo '</PRE>';
```

### Go

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

var value b24.ID
if err := json.Unmarshal(res.Result, &value); err != nil {
	return fmt.Errorf("разбор ответа: %w", err)
}
fmt.Println("результат:", value)
```

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