لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/entities/pages/catalog.md فهرس التوثيق — /llms.txt
مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.
Block catalog
GET /v1/block-repository
Returns the Bitrix24 account's block catalog grouped by section — this is where you get the block code to add to a page. The catalog is shared across the whole Bitrix24 account and does not depend on a site or page.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
Parametersection (query) |
Typestring | Requiredno | DescriptionCatalog section code — a key of the data object in the response without the parameter, for example text or cover. With the parameter, data contains only this section |
Parameterscope (query) |
Typestring | Requiredno | DescriptionSite area: KNOWLEDGE — knowledge base, GROUP — workgroup pages, MAINPAGE — main pages. For other sites, omit the parameter |
Pagination. The method has no limit and offset parameters: the catalog or a section is returned in full in a single call.
Examples
curl — personal key
curl "https://vibecode.bitrix24.com/v1/block-repository?section=text" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl "https://vibecode.bitrix24.com/v1/block-repository?section=text" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN"
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/block-repository?section=text', {
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
const { data: section } = await res.json()
// The item key in items is the block code for POST /v1/pages/:pageId/blocks
for (const [code, block] of Object.entries(section.items)) {
console.log(code, block.name)
}
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/block-repository?section=text', {
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { data: section } = await res.json()
Response fields
Without the section parameter, the data object is a dictionary of sections: the key is the section code, the value is the section object. With the section parameter, data holds the section object directly, and the paths below are read without the <section> segment.
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionAlways true on success |
Fielddata |
Typeobject | DescriptionDictionary of catalog sections, or a single section with section |
Fielddata.<section>.name |
Typestring | DescriptionSection name in the Bitrix24 account language. Can be an empty string |
Fielddata.<section>.meta |
Typeobject | array | DescriptionService data of the section: an object or, if there is no data, an empty array []. Application sections do not have this field |
Fielddata.<section>.new |
Typeboolean | DescriptionNew section flag |
Fielddata.<section>.type |
Typearray | null | DescriptionSite types the section applies to, for example ["page", "store", "smn"], or null. Application sections do not have this field |
Fielddata.<section>.specialType |
Typestring | null | DescriptionService type of the section, null on the tested Bitrix24 account. Application sections do not have this field |
Fielddata.<section>.separator |
Typeboolean | DescriptionService flag of the section, false on the tested Bitrix24 account |
Fielddata.<section>.app_code |
Typestring | boolean | DescriptionCode of the application that added the section, or false for a built-in section |
Fielddata.<section>.items |
Typeobject | array | DescriptionSection blocks. The key is the block code, passed in the code field when adding a block. An empty section has an empty array [] |
Fielddata.<section>.items.<code>.id |
Typenull | DescriptionAlways null. A catalog block is identified by its key in items, not by this field |
Fielddata.<section>.items.<code>.name |
Typestring | DescriptionBlock name in the Bitrix24 account language |
Fielddata.<section>.items.<code>.description |
Typestring | null | DescriptionBlock description. Can be an empty string. Application blocks return null |
Fielddata.<section>.items.<code>.namespace |
Typestring | DescriptionBlock source: bitrix for built-in blocks, the application code for application blocks |
Fielddata.<section>.items.<code>.section |
Typearray | DescriptionCodes of all sections the block belongs to |
Fielddata.<section>.items.<code>.type |
Typearray | DescriptionSite types the block applies to, for example ["page", "store"]. Can be an empty array |
Fielddata.<section>.items.<code>.preview |
Typestring | DescriptionPreview image URL. For built-in blocks the address has no scheme and starts with // |
Fielddata.<section>.items.<code>.new |
Typeboolean | DescriptionNew block flag |
Fielddata.<section>.items.<code>.restricted |
Typeboolean | DescriptionRestricted block flag. On the tested Bitrix24 account, true for application blocks |
Fielddata.<section>.items.<code>.repo_id |
Typestring | boolean | DescriptionApplication block number as a string, false for built-in blocks. The key of such a block in items has the form repo_<number> |
Fielddata.<section>.items.<code>.app_code |
Typestring | boolean | DescriptionCode of the application that added the block, or false |
Fielddata.<section>.items.<code>.requires_updates |
Typeboolean | DescriptionService flag of the block, false on the tested Bitrix24 account |
Fielddata.<section>.items.<code>.version |
Typestring | null | DescriptionVersion number as a string, for example 18.5.0, or null. Built-in blocks only |
Fielddata.<section>.items.<code>.system |
Typeboolean | DescriptionService flag of the block. Built-in blocks only |
Fielddata.<section>.items.<code>.only_for_license |
Typestring | DescriptionLicense label as a string, can be empty. Built-in blocks only |
Response example
Response to GET /v1/block-repository?section=text, showing one block from the section:
{
"success": true,
"data": {
"name": "Text",
"meta": {
"ai_text_placeholder": "text for website, family business, sale of flowers",
"ai_text_max_tokens": 150
},
"new": false,
"type": null,
"specialType": null,
"separator": false,
"app_code": false,
"items": {
"03.1.three_cols_big_with_text_and_titles": {
"id": null,
"name": "Full-width 3-column text on a colored background",
"namespace": "bitrix",
"new": false,
"version": null,
"type": [],
"section": ["columns", "text"],
"system": false,
"description": "Three columns with titles and text",
"preview": "//your-portal.bitrix24.com/bitrix/blocks/bitrix/03.1.three_cols_big_with_text_and_titles/preview.jpg",
"restricted": false,
"repo_id": false,
"app_code": false,
"only_for_license": "",
"requires_updates": false
}
}
}
}
Response to GET /v1/block-repository without parameters, showing two catalog sections and one block. For the empty favourite section, the items field is returned as an array:
{
"success": true,
"data": {
"favourite": {
"name": "",
"meta": [],
"new": false,
"type": null,
"specialType": null,
"separator": false,
"app_code": false,
"items": []
},
"text": {
"name": "Text",
"meta": {
"ai_text_placeholder": "text for website, family business, sale of flowers",
"ai_text_max_tokens": 150
},
"new": false,
"type": null,
"specialType": null,
"separator": false,
"app_code": false,
"items": {
"03.1.three_cols_big_with_text_and_titles": {
"id": null,
"name": "Full-width 3-column text on a colored background",
"namespace": "bitrix",
"new": false,
"version": null,
"type": [],
"section": ["columns", "text"],
"system": false,
"description": "Three columns with titles and text",
"preview": "//your-portal.bitrix24.com/bitrix/blocks/bitrix/03.1.three_cols_big_with_text_and_titles/preview.jpg",
"restricted": false,
"repo_id": false,
"app_code": false,
"only_for_license": "",
"requires_updates": false
}
}
}
}
}
Error response example
404 — no section with this code:
{
"success": false,
"error": {
"code": "SECTION_NOT_FOUND",
"message": "No such repository section. Omit `section` to read the whole catalog."
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP404 | CodeSECTION_NOT_FOUND |
DescriptionThe Bitrix24 account catalog has no section with the code from section |
| HTTP400 | CodeINVALID_SCOPE |
Descriptionscope is not one of KNOWLEDGE, GROUP, MAINPAGE |
| HTTP400 | CodeINVALID_PARAMS |
DescriptionBitrix24 rejected the request: a required parameter is missing |
| HTTP413 | CodeRESPONSE_TOO_LARGE |
DescriptionThe catalog is larger than 5 MB. Request one section at a time via section |
| HTTP502 | CodeBLOCK_REPOSITORY_UNCONFIRMED |
DescriptionBitrix24 did not return the catalog. Retry the request |
| HTTP403 | CodeBITRIX_ACCESS_DENIED |
DescriptionThe user the key was issued under has no site permissions in Bitrix24 |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 rejected the request. The error text is in message |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe API key does not have the landing scope |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe API key has no configured tokens |
Full list of common API errors — Errors.
Known specifics
One block in several sections. A block is repeated in every section listed in its section field. When collecting a list of codes across the whole catalog, deduplicate by the block key.
The full catalog is about a megabyte. On the tested Bitrix24 account the catalog contains 33 sections and about 1500 blocks, and the response is about 950 KB. If you need one type of block, request the section via section.
Catalog contents depend on the Bitrix24 account. Installed applications add their own sections, and the code of such a section matches the application code, for example krayt.monotovar. Some sections have Cyrillic codes — pass the section value URL-encoded, for example via encodeURIComponent.