Set or change a user's manager (moves their whole sub-tree).
PUT
/admin/org-chart/users/{userId}/manager
const url = 'https://api.gospl.example/v1/admin/org-chart/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/manager';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"managerId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.gospl.example/v1/admin/org-chart/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/manager \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "managerId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Rejects any change that would create a cycle (FR-06). Takes effect immediately for downstream access checks (FR-07).
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” userId
required
string format: uuid
Request Body required
Section titled “Request Body required ” Media type application/json
object
managerId
required
The new manager. Must not be the user or any of their descendants.
string format: uuid
Example generated
{ "managerId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “ Responses ”Updated.
Media type application/json
object
Example generated
{ "user": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "jobTitle": "example", "team": "example" }, "managerId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Missing/invalid credentials.
Media type application/json
object
code
required
string
message
required
string
Example generated
{ "code": "example", "message": "example"}Not an admin, or cross-tenant.
Media type application/json
object
code
required
string
message
required
string
Example generated
{ "code": "example", "message": "example"}User not found within the caller’s tenant.
Media type application/json
object
code
required
string
message
required
string
Example generated
{ "code": "example", "message": "example"}Rejected — would create a cycle in the reporting graph (FR-06).
Media type application/json
object
code
required
string
message
required
string
Example generated
{ "code": "example", "message": "example"}