Update department
Update an existing department
- Parameters
- Advanced call ?
Function UpdateDepartment(Val URL, Val DepartmentID, Val Name = "", Val ParentID = "", Val HeadID = "", Val Token = "") Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| URL | --url | String | ✔ | URL of webhook or a Bitrix24 domain, when token used |
| DepartmentID | --depid | String, Number | ✔ | Department ID |
| Name | --title | String | ✖ | Department name |
| ParentID | --parentid | String, Number | ✖ | ID of parent department |
| HeadID | --headid | String, Number | ✖ | ID of department manager |
| Token | --token | String | ✖ | Access token, when app auth method used |
Returns
Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
| Parameter | Description |
|---|---|
| proxy | InternetProxy or a structure with fields Protocol, Host, Port, User, Password, UseOSAuthentication |
| timeout | Request execution timeout |
| adv_response | Formats the response as a complete HTTP structure with fields code, body, and headers |
| retries | Number of HTTP request send attempts on 5** status codes or internal client errors |
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
tip
Method at API documentation: department.update
1C:Enterprise/OneScript code example
URL = "https://b24-ar17wx.bitrix24.by/rest/1/av5...";
DepartmentID = "2962";
ParentID = 7;
Result = OPI_Bitrix24.UpdateDepartment(URL, DepartmentID, , ParentID);
URL = "b24-ar17wx.bitrix24.by";
Token = "a5b00469006e9f06006b12e400000001000...";
DepartmentID = "2964";
Name = "New department";
ParentID = 1;
HeadID = 10;
Result = OPI_Bitrix24.UpdateDepartment(URL
, DepartmentID
, Name
, ParentID
, HeadID
, Token);
- Bash
- CMD/Bat
oint bitrix24 UpdateDepartment \
--url "b24-ar17wx.bitrix24.by" \
--depid 4342 \
--title "New department" \
--parentid 1 \
--headid 10 \
--token "***"
oint bitrix24 UpdateDepartment ^
--url "b24-ar17wx.bitrix24.by" ^
--depid 4342 ^
--title "New department" ^
--parentid 1 ^
--headid 10 ^
--token "***"
Result
{
"result": true,
"time": {
"start": 1784481252,
"finish": 1784481252.46841,
"duration": 0.468410015106201,
"processing": 0,
"date_start": "2026-07-19T17:14:12+00:00",
"date_finish": "2026-07-19T17:14:12+00:00",
"operating_reset_at": 1784481852,
"operating": 0.17632007598877
}
}