Change organisation admin role
Changes the role of an admin of the organisation, for example to give an organisation a new super admin when its only super admin left. The roles of the admin in other organisations do not change. In the dashboard, this is Change Admin Role.
- Same role: a request for the role that the admin has changes nothing and gets the same answer. An admin with an older role (
Admin,DpoorDeveloper) has the access ofNormalAdmin: the roleNormalAdminkeeps the older role. - Last active super admin: an organisation keeps one active super admin, that is a super admin who logged in at least once and is not disabled. An invited super admin who never logged in, and a disabled super admin, do not count. The role of the last active super admin cannot change to
NormalAdmin(409last_super_admin). - Effect: the change has effect within 60 seconds. After that, the access token of the admin with the old role gets
401, and the dashboard of the admin gets a token with the new role at its next refresh. The sessions of the admin do not end. - Access of the account: a disabled admin stays disabled. The operations of a super admin (below
/super-admin/{adminId}) act on super admins only: after the change toNormalAdmin, they answer404for the admin.
The account actions of the admin get role_changed_to_super_admin or role_changed_to_admin. A suspended organisation is accepted.
Authorizations
AuthorizationstringheaderrequiredAn access token:
Bearer <access-token>.
Path parameters
organisationId stringrequiredThe ID of the organisation, from List organisations of the installation.
At most 256 characters.
Example:
"6731f0c2a1b2c3d4e5f60789"adminId stringrequiredThe ID of an admin of the organisation, from List organisation admins.
At most 256 characters.
Example:
"6731f1d8a1b2c3d4e5f6078b"
Body
roleenum<string>requiredSuperAdmin(Super Admin in the dashboard): manages the organisation and its team.NormalAdmin(Administrator in the dashboard): manages the organisation, but not the team.Available options:
SuperAdmin,NormalAdminExample:
"SuperAdmin"
Response
The admin after the change.
adminobjectAn admin account as a platform admin sees it.