demoteUserToGuestWithHttpInfo method
Demote a user to a guest
Convert a regular user into a guest. This will convert the user into a guest for the whole system while retaining their existing team and channel memberships. Minimum server version: 5.16 ##### Permissions Must be logged in as the user or have the demote_to_guest
permission.
Note: This method returns the HTTP Response
.
Parameters:
- String userId (required): User GUID
Implementation
Future<Response> demoteUserToGuestWithHttpInfo(
String userId,
) async {
// ignore: prefer_const_declarations
final path = r'/users/{user_id}/demote'.replaceAll('{user_id}', userId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <MmQueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}