For AI agents: markdown of this page — /docs-content-en/lists/sections.md documentation index — /llms.txt
Sections
Group list elements by sections: get the list of sections, create new ones, update and delete. Sections support nesting — a section can have a parent.
Bitrix24 API: lists.section.*
Scope: lists
List sections
GET /v1/lists/:iblockId/sections
Returns the sections of the specified list. Sections group elements and can form a tree — a section may have a parent section.
Parameters
| Parameter | Type | Req. | Default | Description |
|---|---|---|---|---|
iblockId (path) |
string | yes | — | Numeric IBLOCK_ID or the list's symbolic code. Ids are available via GET /v1/lists |
iblockTypeId (query) |
string | no | lists |
Infoblock type. Values:lists — regular lists, defaultlists_socnet — workgroup listsbitrix_processes — service workflows |
filter (query) |
object | no | — | Filter by section fields — ID, NAME, CODE, IBLOCK_SECTION_ID, SORT.Filtering syntax. Example: ?filter={"NAME":"Documents"} |
select (query) |
string | no | — | Comma-separated list of returned fields. Example: ?select=ID,NAME,CODE |
Examples
curl — personal key
curl https://vibecode.bitrix24.com/v1/lists/121/sections \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl https://vibecode.bitrix24.com/v1/lists/121/sections \
-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/lists/121/sections', {
headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const { data, meta } = await res.json()
console.log('Sections:', meta.total)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/lists/121/sections', {
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { data } = await res.json()
Response fields
Response fields are in Bitrix24 form: upper-case keys with underscores, numeric values arrive as strings, unset fields are null.
| Field | Type | Description |
|---|---|---|
success |
boolean | Always true on success |
data |
array | Array of sections |
data[].ID |
string | Section id |
data[].NAME |
string | Section name |
data[].IBLOCK_SECTION_ID |
string | Parent section id. Arrives null for a root section |
data[].SORT |
string | Sort index |
data[].CODE |
string | Section symbolic code |
meta.total |
number | Total number of sections matching the request |
Response example
{
"success": true,
"data": [
{
"ID": "137",
"NAME": "Sales department documents",
"IBLOCK_SECTION_ID": null,
"SORT": "100",
"CODE": "sales_docs"
},
{
"ID": "139",
"NAME": "Marketing department documents",
"IBLOCK_SECTION_ID": null,
"SORT": "200",
"CODE": "marketing_docs"
}
],
"meta": { "total": 2 }
}
Error response example
400 — the filter parameter is not valid JSON:
{
"success": false,
"error": {
"code": "INVALID_FILTER",
"message": "filter must be valid JSON, e.g. filter={\"NAME\":\"%urgent%\"}."
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| 400 | INVALID_FILTER |
filter is not valid JSON |
| 400 | INVALID_IBLOCK_TYPE |
iblockTypeId is not in the allowed set |
| 403 | BITRIX_ACCESS_DENIED |
No access to the list, or a list with this id does not exist |
| 409 | LISTS_MODULE_NOT_ENABLED |
The "Lists" module is not enabled on the portal |
| 403 | SCOPE_DENIED |
The API key lacks the lists scope |
| 401 | TOKEN_MISSING |
The API key has no configured tokens |
Full list of common API errors — Errors.
Known specifics
The tree is reconstructed from IBLOCK_SECTION_ID. Sections arrive as a flat array. To build the tree, group sections by their IBLOCK_SECTION_ID value: for root sections it is null, for nested ones it is the parent section id.