For AI agents: markdown of this page — /docs-content-en/humanresources/members/move.md documentation index — /llms.txt
Move members
POST /v1/humanresources/nodes/:id/members/move
Moves the specified employees into a target node and assigns them a role within it. Accepts a list of employee identifiers and a single role shared by the whole list.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id (path) |
number | yes | Identifier of the target node — where the members are moved to |
Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
userIds |
array | yes | Employee identifiers. Search: POST /v1/humanresources/employees/search |
role |
string | yes | Role assigned to all moved employees. Available roles — Node members |
Examples
curl — personal key
curl -X POST -H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"userIds": [42, 108], "role": "MEMBER_HEAD"}' \
https://vibecode.bitrix24.com/v1/humanresources/nodes/23/members/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 '{"userIds": [42, 108], "role": "MEMBER_HEAD"}' \
https://vibecode.bitrix24.com/v1/humanresources/nodes/23/members/move
JavaScript — personal key
const res = await fetch(
'https://vibecode.bitrix24.com/v1/humanresources/nodes/23/members/move',
{
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ userIds: [42, 108], role: 'MEMBER_HEAD' }),
}
)
const body = await res.json()
JavaScript — OAuth application
const res = await fetch(
'https://vibecode.bitrix24.com/v1/humanresources/nodes/23/members/move',
{
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({ userIds: [42, 108], role: 'MEMBER_HEAD' }),
}
)
const body = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
success |
boolean | true on successful execution |
data.success |
boolean | true if the members were moved |
Response example
{
"success": true,
"data": {
"success": true
}
}
Error response example
400 — role not provided:
{
"success": false,
"error": {
"code": "INVALID_PARAMS",
"message": "Request object validation failed",
"validation": [
{
"field": "MISSING_ROLE",
"message": "Parameter \"role\" is required."
}
]
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| 400 | INVALID_PARAMS |
Role not provided, or :id is not a positive integer |
| 404 | NOT_FOUND |
Unknown operation in the path after members |
| 403 | SCOPE_DENIED |
The key is missing the humanresources scope |
| 401 | TOKEN_MISSING |
The API key has no Bitrix24 tokens configured |
Full list of common API errors — Errors.
Known specifics
- One role for the whole list. All employees in
userIdsreceive the same role. To assign different roles, call the operation separately for each role, or set the entire node membership via Replace membership.