PUT/v2/administration/users/{userId}/set-role/{role}

Set a server user's global role

Sets the global role of a server user on the Tolgee Platform server. Choose a role from the supported values to change the user's platform-wide access level.

2 parameters
userIdintegerrequired
The integer identifier of the server user whose global role to change.
rolestringrequired
The user's global platform role. Must be `USER`, `ADMIN`, or `SUPPORTER`.
Allowed:USERADMINSUPPORTER

5 status codes
200Confirms that the server user's global role was set.
400Returned when `userId` or `role` is invalid.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
401Returned when the request is unauthenticated.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
403Returned when the authenticated user lacks permission to change server roles.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
404Returned when the specified server user is not found.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional

Error handling

A 400 is returned when userId or role is invalid, a 401 when the request is unauthenticated, a 403 when the authenticated user lacks permission to change server roles, and a 404 when the user is not found. The userId path parameter must be an integer, and role must be USER, ADMIN, or SUPPORTER.