For AI agents: markdown of this page — /docs-content-en/humanresources/node-operations/move.md documentation index — /llms.txt
Move node
POST /v1/humanresources/nodes/:id/move
Moves an organizational structure node under a different parent node in the tree. After the move, the node and all its child nodes inherit the new parent.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
Parameterid (path) |
Typenumber | Requiredyes | DescriptionIdentifier of the node being moved. List: GET /v1/humanresources/nodes?type=DEPARTMENT |
Request fields (body)
| Field | Type | Required | Description |
|---|---|---|---|
FieldparentId |
Typenumber | Requiredyes | DescriptionIdentifier of the new parent node. List: GET /v1/humanresources/nodes?type=DEPARTMENT |
Examples
curl — personal key
curl -X POST -H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"parentId": 17}' \
https://vibecode.bitrix24.com/v1/humanresources/nodes/39/move
curl — OAuth application
curl -X POST -H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"parentId": 17}' \
https://vibecode.bitrix24.com/v1/humanresources/nodes/39/move
JavaScript — personal key
const res = await fetch(
'https://vibecode.bitrix24.com/v1/humanresources/nodes/39/move',
{
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ parentId: 17 }),
}
)
const body = await res.json()
console.log(body.data.parentId)
JavaScript — OAuth application
const res = await fetch(
'https://vibecode.bitrix24.com/v1/humanresources/nodes/39/move',
{
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({ parentId: 17 }),
}
)
const body = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionAlways true on success |
Fielddata.id |
Typenumber | DescriptionIdentifier of the moved node |
Fielddata.name |
Typestring | DescriptionNode name |
Fielddata.type |
Typestring | DescriptionNode type: DEPARTMENT or TEAM |
Fielddata.structureId |
Typenumber | DescriptionOrganizational structure identifier |
Fielddata.parentId |
Typenumber | DescriptionIdentifier of the new parent node |
Fielddata.description |
Typestring | null | DescriptionNode description |
Fielddata.accessCode |
Typestring | DescriptionNode access code |
Fielddata.userCount |
Typenumber | DescriptionNumber of employees in the node |
Fielddata.colorName |
Typestring | null | DescriptionNode color |
Fielddata.xmlId |
Typestring | null | DescriptionExternal identifier |
Fielddata.createdAt |
Typestring | null | DescriptionCreation date |
Fielddata.updatedAt |
Typestring | null | DescriptionModification date |
Response example
{
"success": true,
"data": {
"id": 39,
"name": "Sales department",
"type": "DEPARTMENT",
"structureId": 1,
"parentId": 17,
"description": "Direct sales group",
"accessCode": "SN39",
"userCount": 0,
"colorName": "blue",
"xmlId": null,
"createdAt": null,
"updatedAt": null
}
}
Error response example
400 — invalid node identifier in the path:
{
"success": false,
"error": {
"code": "INVALID_PARAMS",
"message": "id must be a positive integer"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeINVALID_PARAMS |
DescriptionThe node identifier in the path is not a positive integer |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe key is missing the humanresources scope |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe API key has no Bitrix24 tokens configured |
Full list of common API errors — Errors.
Known specifics
- The move response contains the node record without a
membersfield. To get the node's employee list after the move, callGET /v1/humanresources/nodes/:id.