createApiKey method
POST /apiKey
Implementation
Future<ApiKeyDto> createApiKey({required String sudoToken, String? name}) =>
_guardApi(() async {
final data = name == null ? null : CreateApiKeyDto(name: name).toJson();
final response = await manageDio.post(
'/apiKey',
data: data,
options: _sudoOptions(sudoToken),
);
return ApiKeyDto.fromJson(response.data as Map<String, dynamic>);
});