[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fsites\u002Fsettings":3,"docs-tabs-entities\u002Fsites\u002Fsettings":6},{"content":4,"lastmod":5},"## Site settings\n\n`GET \u002Fv1\u002Fsites\u002F:id\u002Fsettings`\n\nReturns the site's additional settings: analytics counters, the cookie banner, theme and fonts, the Bitrix24 widget, store parameters.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `id` (path) | number | yes | Site identifier — a positive integer. List: [`GET \u002Fv1\u002Fsites`](\u002Fdocs\u002Fentities\u002Fsites\u002Flist) |\n| `scope` (query) | string | no | Internal landing scope: `KNOWLEDGE` \u002F `GROUP` \u002F `MAINPAGE`. Specify it if the site belongs to the corresponding scope. Otherwise `404 ENTITY_NOT_FOUND` is returned. An ordinary site requested with `scope` also returns `404` |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsites\u002F109\u002Fsettings\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsites\u002F109\u002Fsettings\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\"\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsites\u002F109\u002Fsettings', {\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { success, data } = await res.json()\nconsole.log('Analytics counter enabled:', data.GACOUNTER_USE === 'Y')\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsites\u002F109\u002Fsettings', {\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\nSetting keys are returned as is, in uppercase. The key set differs from site to site. If the site has no settings, `data` is `{}`.\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | `true` on success |\n| `data` | object | Site settings. The key is the setting name, the value is a string, a number or an array of strings |\n| `data.\u003CNAME>_USE` | string | Whether the feature is on: `Y` \u002F `N`. For example, `GACOUNTER_USE` — analytics counter, `COOKIES_USE` — cookie banner |\n| `data.COOKIES_*` | string | Cookie banner settings: colors, position, agreement |\n| `data.B24BUTTON_*` | string | The Bitrix24 widget on the site. `B24BUTTON_CODE` — the widget script URL, or `N` when the widget is off |\n| `data.THEME_*`, `data.THEMEFONTS_*` | string | Theme: color, fonts and their sizes |\n| `data.CSSBLOCK_CODE` | string | Custom site CSS |\n| `data.SETTINGS_*` | string \\| number \\| string[] | Store parameters: currency `SETTINGS_CURRENCY_ID`, price types `SETTINGS_PRICE_CODE`, showing the old price and discount, cart position |\n\nThe same settings, except the store parameters `SETTINGS_*` and `B24BUTTON_CODE`, come in the full site export — in the `fields.ADDITIONAL_FIELDS` field of the [`GET \u002Fv1\u002Fsites\u002F:id\u002Fexport`](\u002Fdocs\u002Fentities\u002Fsites\u002Fexport) response.\n\n## Response example\n\nShowing 11 of 49 settings:\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"COOKIES_USE\": \"N\",\n    \"B24BUTTON_CODE\": \"N\",\n    \"B24BUTTON_COLOR\": \"site\",\n    \"GACOUNTER_USE\": \"N\",\n    \"ROBOTS_USE\": \"N\",\n    \"SETTINGS_PRICE_CODE\": [\n      \"BASE\"\n    ],\n    \"SETTINGS_SHOW_PRICE_COUNT\": 1,\n    \"THEME_COLOR\": \"#4fd2c2\",\n    \"THEMEFONTS_CODE\": \"Open Sans\",\n    \"UP_SHOW\": \"Y\",\n    \"HEADBLOCK_USE\": \"N\"\n  }\n}\n```\n\n## Error response example\n\n404 — site not found:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"ENTITY_NOT_FOUND\",\n    \"message\": \"Site not found or not visible\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `INVALID_PARAMS` | `id` is not a positive integer |\n| 400 | `INVALID_SCOPE` | `scope` is not `KNOWLEDGE`, `GROUP` or `MAINPAGE` |\n| 404 | `ENTITY_NOT_FOUND` | No site with this `id`, the site is not accessible to the key's user, or it belongs to a different `scope` |\n| 409 | `LANDING_MODULE_NOT_ENABLED` | The Sites module is unavailable on this Bitrix24 account. Ask a Bitrix24 account administrator to enable it — until then a retry returns the same refusal |\n| 422 | `BITRIX_ERROR` | Bitrix24 returned the settings in a form other than an object, or rejected the request. The reason is in `message` |\n| 403 | `BITRIX_ACCESS_DENIED` | Bitrix24 denied access: the key's user is not an administrator, or the feature is unavailable on the Bitrix24 account |\n| 403 | `SCOPE_DENIED` | The API key does not have the `landing` scope |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |\n\nThe full list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n- **Setting values are data, not code to run.** `CSSBLOCK_CODE` holds CSS, and the map and counter settings hold keys and identifiers of external services. Output such values as text and do not embed them in your own pages.\n- **The value type of the same key can differ.** `SETTINGS_SHOW_PRICE_COUNT` comes as the number `1` on some sites and as the string `\"1\"` on others. Compare values regardless of type or convert them to a string.\n\n## See also\n\n- [Full site export](\u002Fdocs\u002Fentities\u002Fsites\u002Fexport)\n- [Get a site](\u002Fdocs\u002Fentities\u002Fsites\u002Fget)\n- [Sites](\u002Fdocs\u002Fentities\u002Fsites)\n","2026-10-16",{},1795376984659]