Skip to main content

Create new subfolder

Create new folder inside another folder

Function CreateSubfolder(Val URL, Val FolderID, Val Name, Val Token = "") Export

ParameterCLI optionTypeRequiredDescription
URL--urlStringURL of webhook or a Bitrix24 domain, when token used
FolderID--folderidString, NumberParent folder identifier
Name--titleStringName of new folder
Token--tokenStringAccess token, when app auth method used
Returns

Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API

tip

Method at API documentation: disk.folder.addsubfolder


1C:Enterprise/OneScript code example
FolderID = "46678";
Name = "New subfolder";
Filename2 = "New subfolder 2";

URL = "https://b24-ar17wx.bitrix24.by/rest/1/av5...";

Result = OPI_Bitrix24.CreateSubfolder(URL, FolderID, Filename2);

URL = "b24-ar17wx.bitrix24.by";
Token = "a5b00469006e9f06006b12e400000001000...";

Result = OPI_Bitrix24.CreateSubfolder(URL, FolderID, Name, Token);
oint bitrix24 CreateSubfolder \
--url "b24-ar17wx.bitrix24.by" \
--folderid 57804 \
--title "New subfolder" \
--token "***"
Result
{
"result": {
"ID": 57808,
"NAME": "New subfolder",
"CODE": null,
"STORAGE_ID": "3",
"TYPE": "folder",
"REAL_OBJECT_ID": 57808,
"PARENT_ID": "57804",
"DELETED_TYPE": 0,
"CREATE_TIME": "2026-05-26T14:12:20+00:00",
"UPDATE_TIME": "2026-05-26T14:12:20+00:00",
"DELETE_TIME": null,
"CREATED_BY": "1",
"UPDATED_BY": "1",
"DELETED_BY": null,
"DETAIL_URL": "https://b24-ar17wx.bitrix24.by/docs/path/New catalog/New subfolder"
},
"time": {
"start": 1779804740,
"finish": 1779804740.20399,
"duration": 0.20398998260498,
"processing": 0,
"date_start": "2026-05-26T14:12:20+00:00",
"date_finish": "2026-05-26T14:12:20+00:00",
"operating_reset_at": 1779805340,
"operating": 0
}
}