لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/entities/folders.md فهرس التوثيق — /llms.txt

مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.

Folders

Manage folders on the Bitrix24 Drive: list contents, create, rename and delete. Folders are stored inside storages and form a nested tree.

Bitrix24 API: disk.folder.* Scope: disk

Create folder

POST /v1/folders

Creates a new folder inside the specified parent folder. The body is passed flat, without a fields wrapper.

Request fields (body)

Field Type Required Description
Fieldname Typestring Requiredyes DescriptionName of the new folder. The name must be available in the destination folder
FieldparentId Typenumber Requiredyes DescriptionID of the parent folder. The storage root folder is given by rootFolderId from GET /v1/storages

The code field is read-only — it is not saved on creation, and passing it returns 400 READONLY_FIELD.

Examples

curl — personal key

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/folders" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Documents","parentId":27}'

curl — OAuth application

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/folders" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Documents","parentId":27}'

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/folders', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ name: 'Documents', parentId: 27 }),
})

const { success, data } = await res.json()
console.log('Folder created:', data.id)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/folders', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ name: 'Documents', parentId: 27 }),
})

const { success, data } = await res.json()

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata Typeobject DescriptionThe created folder object. For all fields, see Folder fields

The link to the folder in Bitrix24 is returned in data.detailUrl. Access is limited by the employee's Bitrix24 permissions.

Response example

JSON
{
  "success": true,
  "data": {
    "id": 9301,
    "name": "Documents",
    "code": null,
    "storageId": 1,
    "type": "folder",
    "realObjectId": 9301,
    "parentId": 27,
    "deletedType": 0,
    "createdAt": "2026-06-25T12:10:00.000Z",
    "updatedAt": "2026-06-25T12:10:00.000Z",
    "deletedAt": null,
    "createdBy": 1,
    "updatedBy": 1,
    "deletedBy": null,
    "detailUrl": "https://<portal>.bitrix24.com/company/personal/user/1/disk/path/Uploaded files/Documents"
  }
}

Error response example

400 — the required name field is missing:

JSON
{
  "success": false,
  "error": {
    "code": "MISSING_REQUIRED_FIELDS",
    "message": "Body field \"name\" is required to create diskFolder."
  }
}

Errors

HTTP Code Description
HTTP400 CodeMISSING_REQUIRED_FIELDS DescriptionThe name field is missing
HTTP400 CodeMISSING_PARENT_ID DescriptionThe parentId field is missing
HTTP400 CodeREADONLY_FIELD DescriptionA read-only field was passed in the body, for example code
HTTP422 CodeBITRIX_ERROR DescriptionThe name is already taken in the destination folder. error.b24Code is DISK_OBJ_22000. Choose another name before retrying
HTTP403 CodeSCOPE_DENIED DescriptionThe API key does not have the disk scope
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no configured portal tokens

For the full list of common API errors, see Errors.

See also