Skip to main content
Super admins and platform admins

Change organisation admin role

PUT/v4/onboard/platform/operator/organisation/{organisationId}/admin/{adminId}/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, Dpo or Developer) has the access of NormalAdmin: the role NormalAdmin keeps 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 (409 last_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 to NormalAdmin, they answer 404 for 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

  • Authorizationstringheaderrequired

    An access token: Bearer <access-token>.

Path parameters

Body

application/json
  • roleenum<string>required

    SuperAdmin (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,NormalAdmin

    Example:"SuperAdmin"

Response

application/json

The admin after the change.

  • adminobject

    An admin account as a platform admin sees it.