static void SendEmailToSingleRecipient()
        {
            // Replace '<CONTACT KEY>' with a real subscriber key
            const string contactKey = "<CONTACT KEY>";

            /* Replace the constructor parameters with your Marketing Cloud account credentials
             * (<APPLICATION DATA-ACCESS PERMISSIONS> is not a mandatory parameter) */

            var client = new Api.Client(
                "<AUTH BASE URL>",
                "<CLIENT ID>",
                "<CLIENT SECRET>",
                "<ACCOUNT ID>",
                "<APPLICATION DATA-ACCESS PERMISSIONS>");

            // Get the asset, transactional messaging API instances:
            var assetApi = client.AssetApi;
            var transactionalMessagingApi = client.TransactionalMessagingApi;

            // Create email send definition:
            var emailDefinitionObject       = SampleHelper.CreateEmailDefinitionObject(assetApi);
            var createEmailDefinitionResult = transactionalMessagingApi.CreateEmailDefinition(emailDefinitionObject);

            // Get email send definition:
            var getEmailDefinitionsResult = transactionalMessagingApi.GetEmailDefinition(createEmailDefinitionResult.DefinitionKey);

            // Update email send definition:
            var updatedDefinitionDescription         = new UpdateEmailDefinitionRequest(description: "Updated email definition description");
            var partiallyUpdateEmailDefinitionResult = transactionalMessagingApi.PartiallyUpdateEmailDefinition(getEmailDefinitionsResult.DefinitionKey, updatedDefinitionDescription);

            // Get email send definition:
            getEmailDefinitionsResult = transactionalMessagingApi.GetEmailDefinition(partiallyUpdateEmailDefinitionResult.DefinitionKey);

            // Send email to single recipient:
            var recipientMessageKey = $"{Guid.NewGuid()}";
            var recipient           = new Recipient(contactKey);

            var messageRequestBody = new SendEmailToSingleRecipientRequest(getEmailDefinitionsResult.DefinitionKey, recipient);

            transactionalMessagingApi.SendEmailToSingleRecipient(recipientMessageKey, messageRequestBody);

            // Get the send status of the email send:
            var recipientSendStatus = transactionalMessagingApi.GetEmailSendStatusForRecipient(recipientMessageKey);
        }
        static void SendEmailToMultipleRecipients()
        {
            // Replace '<CONTACT1 KEY>' and '<CONTACT2 KEY>' with real subscriber keys
            const string contact1Key = "<CONTACT1 KEY>";
            const string contact2Key = "<CONTACT2 KEY>";

            // Environment variables instantiated client:
            var client = new Api.Client();

            // Get the asset, transactional messaging API instances:
            var assetApi = client.AssetApi;
            var transactionalMessagingApi = client.TransactionalMessagingApi;

            // Create email send definition:
            var emailDefinitionObject       = SampleHelper.CreateEmailDefinitionObject(assetApi);
            var createEmailDefinitionResult = transactionalMessagingApi.CreateEmailDefinition(emailDefinitionObject);

            // Send email to multiple recipients:
            var recipient1MessageKey = $"{Guid.NewGuid()}";
            var recipient2MessageKey = $"{Guid.NewGuid()}";

            var recipient1 = new Recipient(contact1Key, messageKey: recipient1MessageKey);
            var recipient2 = new Recipient(contact2Key, messageKey: recipient2MessageKey);

            var recipientsList = new List <Recipient>()
            {
                recipient1, recipient2
            };

            var batchMessageRequestBody = new SendEmailToMultipleRecipientsRequest(createEmailDefinitionResult.DefinitionKey, recipientsList);

            transactionalMessagingApi.SendEmailToMultipleRecipients(batchMessageRequestBody);

            // Get the send status of the two email sends:
            var recipient1SendStatus = transactionalMessagingApi.GetEmailSendStatusForRecipient(recipient1MessageKey);
            var recipient2SendStatus = transactionalMessagingApi.GetEmailSendStatusForRecipient(recipient2MessageKey);
        }