Skip to main content
Version: Current

EmailTrigger.ChangeEmailTriggerToggleStatus

Description​

Toggle the status between Enable and Disable for the specified Email Trigger.

Signature [C#]​

Task ChangeEmailTriggerToggleStatus(int Id, bool Disable);

Properties​

Input​

ParameterTypeRequired / defaultDescription
IdintRequiredSpecify the Id of the email trigger to change the toggle status.
DisableboolRequiredSpecifies the toggle value.

Remarks​

Use ChangeEmailTriggerToggleStatus API to change the toggle status of the email trigger inside the connected AI Command Center.

Example​

C#
public async Task ChangeEmailTriggerToggleStatus()
{
IControlRoomContext context = LoginControlRoom();
try
{
int triggerId = 1;
bool isDisabled = true;
await context.EmailTriggers.ChangeEmailTriggerToggleStatus(triggerId, isDisabled);
}
finally
{
context.Close();
}
}
Connection helper
public IControlRoomContext LoginControlRoom()
{
string RequiredSetting(string name) => Environment.GetEnvironmentVariable(name) ?? throw new InvalidOperationException($"Set {name} before running this example.");
string serverUrl = RequiredSetting("INTELLIBUDDIES_SERVER_URL");
string userName = RequiredSetting("INTELLIBUDDIES_USERNAME");
string password = RequiredSetting("INTELLIBUDDIES_PASSWORD");
string connectionString = $"ServerUrl={serverUrl};UserName={userName};Password={password}";
IControlRoomContext context = new ControlRoomContext(connectionString);
context.Open();
return context;
}

See Get started for namespaces, configuration, and context cleanup, and SDK usage for error handling.