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
Parameterid (path) Typenumber Requiredyes DescriptionIdentifier of the target node — where the members are moved to

Request body fields

Field Type Required Description
FielduserIds Typearray Requiredyes DescriptionEmployee identifiers. Search: POST /v1/humanresources/employees/search
Fieldrole Typestring Requiredyes DescriptionRole assigned to all moved employees. Available roles — Node members

Examples

curl — personal key

Terminal
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

Terminal
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

javascript
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

javascript
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
Fieldsuccess Typeboolean Descriptiontrue on successful execution
Fielddata.success Typeboolean Descriptiontrue if the members were moved

Response example

JSON
{
  "success": true,
  "data": {
    "success": true
  }
}

Error response example

400 — role not provided:

JSON
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMS",
    "message": "Request object validation failed",
    "validation": [
      {
        "field": "MISSING_ROLE",
        "message": "Parameter \"role\" is required."
      }
    ]
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS DescriptionRole not provided, or :id is not a positive integer
HTTP404 CodeNOT_FOUND DescriptionUnknown operation in the path after members
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

  • One role for the whole list. All employees in userIds receive the same role. To assign different roles, call the operation separately for each role, or set the entire node membership via Replace membership.

See also