[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fsites\u002Ffolders\u002Flist":3,"docs-tabs-entities\u002Fsites\u002Ffolders\u002Flist":6},{"content":4,"lastmod":5},"## List site folders\n\n`GET \u002Fv1\u002Fsites\u002F:id\u002Ffolders`\n\nReturns the site's folders.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `id` (path) | number | yes | Site ID — 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 |\n| `parentId` (query) | number | no | Parent folder ID — `data[].id` from this same list. Only folders nested directly in it are returned. An empty value `?parentId=` returns only folders in the site root. Without the parameter, folders of all levels are returned |\n| `deleted` (query) | boolean | no | `true` — only folders in the trash, `false` — only folders outside the trash. Without the parameter, folders in the trash are not returned |\n\nThe `parentId` and `deleted` parameters can be passed together: the response contains folders that match both conditions. The method has no `limit` or `offset` parameters. Other query parameters, such as `select`, are ignored, and the response contains all folder fields.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsites\u002F233\u002Ffolders\" \\\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\u002F233\u002Ffolders\" \\\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\u002F233\u002Ffolders', {\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { success, data } = await res.json()\nconsole.log(`Folders: ${data.length}`)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsites\u002F233\u002Ffolders', {\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\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | `true` on success |\n| `data` | array | Array of folders. Empty if no folder matches the conditions |\n| `data[].id` | number | Folder ID |\n| `data[].parentId` | number \\| null | Parent folder ID. `null` — the folder is in the site root |\n| `data[].siteId` | number | Site ID. List: [`GET \u002Fv1\u002Fsites`](\u002Fdocs\u002Fentities\u002Fsites\u002Flist) |\n| `data[].indexPageId` | number \\| null | ID of the folder's index page — a page from [`GET \u002Fv1\u002Fpages`](\u002Fdocs\u002Fentities\u002Fpages\u002Flist). `null` if not assigned |\n| `data[].active` | boolean | Whether the folder is published |\n| `data[].deleted` | boolean | Whether the folder is in the trash |\n| `data[].title` | string | Folder name |\n| `data[].code` | string | Folder symbolic code — the URL segment of its pages |\n| `data[].createdById` | number \\| null | ID of the user who created the folder. List: [`GET \u002Fv1\u002Fusers`](\u002Fdocs\u002Fentities\u002Fusers\u002Flist) |\n| `data[].modifiedById` | number \\| null | ID of the user who last modified the folder. List: [`GET \u002Fv1\u002Fusers`](\u002Fdocs\u002Fentities\u002Fusers\u002Flist) |\n| `data[].dateCreate` | string \\| null | Creation date in ISO 8601 format without a time zone, in Bitrix24 account time, for example `2026-10-16T15:49:43` |\n| `data[].dateModify` | string \\| null | Last modification date in the same format |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"id\": 121,\n      \"parentId\": null,\n      \"siteId\": 233,\n      \"indexPageId\": null,\n      \"active\": false,\n      \"deleted\": false,\n      \"title\": \"Docs test archive\",\n      \"code\": \"archive\",\n      \"createdById\": 1317,\n      \"modifiedById\": 1317,\n      \"dateCreate\": \"2026-10-16T15:49:55\",\n      \"dateModify\": \"2026-10-16T15:49:55\"\n    },\n    {\n      \"id\": 119,\n      \"parentId\": 117,\n      \"siteId\": 233,\n      \"indexPageId\": null,\n      \"active\": false,\n      \"deleted\": false,\n      \"title\": \"Docs test sneakers\",\n      \"code\": \"sneakers\",\n      \"createdById\": 1317,\n      \"modifiedById\": 1317,\n      \"dateCreate\": \"2026-10-16T15:49:53\",\n      \"dateModify\": \"2026-10-16T15:49:53\"\n    },\n    {\n      \"id\": 117,\n      \"parentId\": null,\n      \"siteId\": 233,\n      \"indexPageId\": null,\n      \"active\": false,\n      \"deleted\": false,\n      \"title\": \"Docs test catalog\",\n      \"code\": \"catalog\",\n      \"createdById\": 1317,\n      \"modifiedById\": 1317,\n      \"dateCreate\": \"2026-10-16T15:49:43\",\n      \"dateModify\": \"2026-10-16T15:49:43\"\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_PARAMS` | `parentId` is not empty and is not a positive integer |\n| 400 | `INVALID_PARAMS` | `deleted` is not `true` or `false` |\n| 400 | `INVALID_SCOPE` | `scope` is not `KNOWLEDGE`, `GROUP` or `MAINPAGE` |\n| 404 | `ENTITY_NOT_FOUND` | No site with this `id` exists, it is not accessible to the key's user, or it belongs to a different `scope` |\n| 422 | `BITRIX_ERROR` | Bitrix24 returned the folder list in an unexpected shape or rejected the request. The reason is in `message` |\n| 409 | `LANDING_MODULE_NOT_ENABLED` | The Sites module is not available on the Bitrix24 account. Ask the account administrator to enable it — while the module is disabled, retrying the request returns the same refusal |\n| 403 | `BITRIX_ACCESS_DENIED` | Bitrix24 denied access: the key's user has no permissions for this site or no administrator permissions, 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\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n- **A non-existent parent folder does not cause an error.** If the site has no folder with this `parentId`, the response is `200` with an empty `data` array.\n\n## See also\n\n- [Create a folder](\u002Fdocs\u002Fentities\u002Fsites\u002Ffolders\u002Fcreate)\n- [Update a folder](\u002Fdocs\u002Fentities\u002Fsites\u002Ffolders\u002Fupdate)\n- [Move a folder to the trash](\u002Fdocs\u002Fentities\u002Fsites\u002Ffolders\u002Ftrash)\n- [Restore a folder](\u002Fdocs\u002Fentities\u002Fsites\u002Ffolders\u002Frestore)\n- [Site folders](\u002Fdocs\u002Fentities\u002Fsites\u002Ffolders)\n- [List sites](\u002Fdocs\u002Fentities\u002Fsites\u002Flist)\n","2026-10-16",{},1795415299424]