## Page settings

`GET /v1/pages/:id/settings`

Returns additional page settings: meta tags, view, theme and catalog parameters.

Requires the `landing` scope. A read-only key receives a response.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|----------|
| `id` (path) | number | yes | Page ID. List: [`GET /v1/pages`](/docs/entities/pages/list) |
| `scope` (query) | string | no | Site type: `KNOWLEDGE` — knowledge base, `GROUP` — workgroup site, `MAINPAGE` — main page. Omit the parameter for pages of other sites |

## Examples

### curl — personal key

```bash
curl -X GET "https://vibecode.bitrix24.com/v1/pages/7/settings" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl -X GET "https://vibecode.bitrix24.com/v1/pages/7/settings" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"
```

### JavaScript — personal key

```javascript
const response = await fetch("https://vibecode.bitrix24.com/v1/pages/7/settings", {
  method: "GET",
  headers: {"X-Api-Key": "YOUR_API_KEY"},
})
const result = await response.json()
if (!response.ok) throw new Error(result.error.message)
console.log(result.data)
```

### JavaScript — OAuth application

```javascript
const response = await fetch("https://vibecode.bitrix24.com/v1/pages/7/settings", {
  method: "GET",
  headers: {"X-Api-Key": "YOUR_APP_KEY", "Authorization": "Bearer USER_SESSION_TOKEN"},
})
const result = await response.json()
if (!response.ok) throw new Error(result.error.message)
console.log(result.data)
```

## Response fields

| Field | Type | Description |
|------|-----|----------|
| `success` | boolean | Always `true` on success |
| `data` | object | Page settings. The key is the setting name in camelCase: group plus name, for example `metaog` and `Title` give `metaogTitle`. The value is a string, a number or an array; flags arrive as the string `Y` or `N`. The set of keys differs between pages |
| `data.metamainUse` | string | Whether meta tags for search engines are enabled: `Y` or `N` |
| `data.metamainTitle` | string | Page title for search engines |
| `data.metamainDescription` | string | Page description for search engines |
| `data.metaogTitle` | string | Title for the link preview in social networks and messengers |
| `data.metaogImage` | string | Image for the link preview: a file ID as a string, for example `"1223"`, or a full URL |
| `data.metarobotsIndex` | string | `Y` — search engines may index the page, `N` — they may not |
| `data.settingsPriceCode` | array | Price type codes for catalog blocks |
| `data.settingsCurrencyId` | string | Price currency in catalog blocks |
| `data.themefontsCode` | string | Font code for the page text, for example `g-font-roboto` |
| `data.viewType` | string | Page view type, for example `adaptive` or `no` |

## Response example

Main fields are shown:

```json
{
  "success": true,
  "data": {
    "metamainUse": "N",
    "metamainTitle": "Photography",
    "metamainDescription": "Do you do professional photography? Tell people about yourself, show clients your portfolio, and they will not keep you waiting!",
    "metaogTitle": "Photography",
    "metaogImage": "https://cdn.bitrix24.site/bitrix/images/demo/page/photography/preview.jpg",
    "metarobotsIndex": "Y",
    "settingsPriceCode": [
      "BASE"
    ],
    "settingsCurrencyId": "USD",
    "themefontsCode": "g-font-roboto",
    "viewType": "no"
  }
}
```

## Error response example

404 — no page with this `id`:

```json
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Page not found."
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 404 | `ENTITY_NOT_FOUND` | `Page not found.` — no page with this `id` |
| 404 | `ENTITY_NOT_FOUND` | `Page or folder not found.` — Bitrix24 did not find the page while reading its settings |
| 400 | `INVALID_PAGE_ID` | `id must be a positive safe integer.` — `id` is not a positive integer |
| 400 | `INVALID_SCOPE` | `scope must be KNOWLEDGE, GROUP or MAINPAGE, or omitted.` — `scope` is not `KNOWLEDGE`, `GROUP` or `MAINPAGE` |
| 422 | `BITRIX_NO_EFFECT` | `Bitrix24 did not return page settings.` — Bitrix24 did not return the page settings |
| 422 | `BITRIX_ERROR` | Bitrix24 rejected the request. The error text comes from Bitrix24 |
| 403 | `SCOPE_DENIED` | The API key does not have the `landing` scope |
| 403 | `BITRIX_ACCESS_DENIED` | The Bitrix24 user on whose behalf the key was issued has no permission to read the page |
| 401 | `TOKEN_MISSING` | The API key has no configured tokens |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |
| 401 | `INVALID_API_KEY` | The key in `X-Api-Key` was not found or has been revoked |
| 409 | `PORTAL_ADDRESS_CHANGED` | The on-premise Bitrix24 moved to a new address, but the key's webhook was issued for the old one. Reissue the key's webhook |
| 429 | `RATE_LIMITED` | The Bitrix24 request limit was exceeded. Retry the request in 1-2 seconds |
| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 did not respond or responded with a server error |
| 503 | `BITRIX_TIMEOUT` | Bitrix24 did not respond within the allotted time |

Full list of common API errors — [Errors](/docs/errors).

## Known specifics

- **Values containing HTML code arrive as raw strings.** For example, `fontsCode` contains font loading tags. Do not insert such values into your page without checking them.
- **Secrets are removed from the settings.** A setting is left out of the response if its name contains `password` or `secret`, or one of the separate words `auth`, `token`, `access_token`, `refresh_token` or `api_key`. A string with a webhook URL or with an `auth=` or `token=` parameter arrives entirely as `[REDACTED]`. Other values arrive unchecked.

## See also

- [Get a page](/docs/entities/pages/get)
- [Page public URL](/docs/entities/pages/public-url)
- [Pages](/docs/entities/pages)
