## Read a catalog manifest

`GET /v1/block-repository/:code/manifest`

Returns the manifest of a catalog block: which nodes, card sets and style settings the block has. Use the selectors from the manifest to edit the block's nodes and cards on a page.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|----------|
| `code` (path) | string | yes | Catalog block code, for example `bitrix:03.1.three_cols_big_with_text_and_titles` or `03.1.three_cols_big_with_text_and_titles` — both forms are accepted. Get the codes from [`GET /v1/block-repository`](/docs/entities/pages/catalog): the code is the key of an item in a section's `items`. Encode colons and `@` in the code with `encodeURIComponent` |
| `scope` (query) | string | no | Internal landing area: `KNOWLEDGE` — knowledge base, `GROUP` — group knowledge base, `MAINPAGE` — home page. Omit it for a regular site |

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/block-repository/bitrix%3A03.1.three_cols_big_with_text_and_titles/manifest" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/block-repository/bitrix%3A03.1.three_cols_big_with_text_and_titles/manifest" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"
```

### JavaScript — personal key

```javascript
const code = encodeURIComponent("bitrix:03.1.three_cols_big_with_text_and_titles")
const response = await fetch(`https://vibecode.bitrix24.com/v1/block-repository/${code}/manifest`, {
  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 code = encodeURIComponent("bitrix:03.1.three_cols_big_with_text_and_titles")
const response = await fetch(`https://vibecode.bitrix24.com/v1/block-repository/${code}/manifest`, {
  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.code` | string | Block code in the form it was passed in the path |
| `data.block` | object | Block description: title `name`, description `description`, catalog sections `section`, site types `type`. Returned if present in the manifest |
| `data.nodes` | object \| array | Block nodes. The key is a node selector, the value is the title `name` and the type `type`, for example `text` or `img`. Returned if present in the manifest |
| `data.cards` | object \| array | Card sets. The key is a set selector, the value is the title `name`, the label nodes `label` and the presets `presets`, if any. A block without cards returns an empty array `[]`. Returned if present in the manifest |
| `data.style` | object \| array | Style settings. The key is an element selector or a group, the value is the title and the available setting types. Returned if present in the manifest |
| `data.assets` | object \| array | Files the block includes. Returned if present in the manifest |

## Response example

Only some of the `style` keys are shown. The full response has six:

```json
{
  "success": true,
  "data": {
    "code": "bitrix:03.1.three_cols_big_with_text_and_titles",
    "block": {
      "name": "Full-width 3-column text on a colored background",
      "description": "Three columns with titles and text",
      "section": [
        "columns",
        "text"
      ]
    },
    "nodes": {
      ".landing-block-node-subtitle": {
        "name": "Subtitle",
        "type": "text"
      },
      ".landing-block-node-title": {
        "name": "Title",
        "type": "text"
      },
      ".landing-block-node-text": {
        "name": "Text",
        "type": "text"
      }
    },
    "cards": {
      ".landing-block-card": {
        "name": "Column",
        "label": [
          ".landing-block-node-subtitle",
          ".landing-block-node-title"
        ]
      }
    },
    "style": {
      ".landing-block-inner-container": {
        "name": "Columns",
        "type": [
          "row-align"
        ]
      },
      ".landing-block-card": {
        "name": "Column",
        "type": [
          "columns",
          "animation"
        ]
      }
    }
  }
}
```

## Error response example

404 — the catalog has no block with this code, or the block has no manifest file:

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

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 404 | `ENTITY_NOT_FOUND` | `Block manifest file not found.` — the catalog has no block with this code, or the block has no manifest file, as with application blocks `repo_N` |
| 404 | `ENTITY_NOT_FOUND` | `Block or page not found.` — the catalog of the current Bitrix24 account has no block with this code. Which of the two messages arrives depends on the step at which the block was not found |
| 400 | `INVALID_PARAMS` | `code must be a non-empty block code.` — `code` is empty or contains only whitespace |
| 400 | `INVALID_SCOPE` | `scope` is not `KNOWLEDGE`, `GROUP` or `MAINPAGE` |
| 502 | `BITRIX_INVALID_RESPONSE` | `Bitrix24 returned an invalid block manifest.` — Bitrix24 returned a manifest that is not an object |
| 502 | `BITRIX_INVALID_RESPONSE` | `Bitrix24 block response exceeds the 8 MiB limit.` — the Bitrix24 response is larger than 8 MiB |
| 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 catalog |
| 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 |
| 401 | `TOKEN_MISSING` | The API key has no configured tokens |
| 409 | `LANDING_MODULE_NOT_ENABLED` | The Sites module is unavailable on the Bitrix24 account |
| 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

- **Application blocks have only a sample.** `repo_N` blocks have no manifest. [`GET /v1/block-repository/:code/content`](/docs/entities/pages/catalog-content) returns the HTML of such a block.
- **A read-only key works.** The method only reads data, so a read-only key gets a response.
- **Addresses with credentials are hidden.** A string that contains an address with credentials is replaced with `[REDACTED]`.

## See also

- [Block catalog](/docs/entities/pages/catalog)
- [Catalog sample](/docs/entities/pages/catalog-content)
- [Block content](/docs/entities/pages/block-content)
- [Rebuild a card set](/docs/entities/pages/cards/update)
- [Pages](/docs/entities/pages)
