mailslurp_netstandard_2x.Api.InboxRulesetControllerApi

All URIs are relative to https://api.mailslurp.com

MethodHTTP requestDescription
CreateNewInboxRulesetPOST /rulesetsCreate an inbox ruleset
DeleteInboxRulesetDELETE /rulesets/{id}Delete an inbox ruleset
DeleteInboxRulesetsDELETE /rulesetsDelete inbox rulesets
GetInboxRulesetGET /rulesets/{id}Get an inbox ruleset
GetInboxRulesetsGET /rulesetsList inbox rulesets
TestInboxRulesetPOST /rulesets/{id}/testTest an inbox ruleset
TestInboxRulesetsForInboxPUT /rulesetsTest inbox rulesets for inbox
TestNewInboxRulesetPATCH /rulesetsTest new inbox ruleset

CreateNewInboxRuleset

InboxRulesetDto CreateNewInboxRuleset (CreateInboxRulesetOptions createInboxRulesetOptions, Guid? inboxId = null)

Create an inbox ruleset

Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;

namespace Example
{
    public class CreateNewInboxRulesetExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new InboxRulesetControllerApi(config);
            var createInboxRulesetOptions = new CreateInboxRulesetOptions(); // CreateInboxRulesetOptions | createInboxRulesetOptions
            var inboxId = new Guid?(); // Guid? | Inbox id to attach ruleset to (optional) 

            try
            {
                // Create an inbox ruleset
                InboxRulesetDto result = apiInstance.CreateNewInboxRuleset(createInboxRulesetOptions, inboxId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling InboxRulesetControllerApi.CreateNewInboxRuleset: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
createInboxRulesetOptionsCreateInboxRulesetOptionscreateInboxRulesetOptions
inboxIdGuid?Inbox id to attach ruleset to[optional]

Return type

InboxRulesetDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200OK-
201Created-
401Unauthorized-
403Forbidden-
404Not Found-

[Back to top] [Back to API list] [Back to Model list] [Back to ]

DeleteInboxRuleset

void DeleteInboxRuleset (Guid id)

Delete an inbox ruleset

Delete inbox ruleset

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;

namespace Example
{
    public class DeleteInboxRulesetExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new InboxRulesetControllerApi(config);
            var id = new Guid(); // Guid | ID of inbox ruleset

            try
            {
                // Delete an inbox ruleset
                apiInstance.DeleteInboxRuleset(id);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling InboxRulesetControllerApi.DeleteInboxRuleset: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
idGuidID of inbox ruleset

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status codeDescriptionResponse headers
204No Content-
401Unauthorized-
403Forbidden-

[Back to top] [Back to API list] [Back to Model list] [Back to ]

DeleteInboxRulesets

void DeleteInboxRulesets (Guid? inboxId = null)

Delete inbox rulesets

Delete inbox rulesets. Accepts optional inboxId filter.

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;

namespace Example
{
    public class DeleteInboxRulesetsExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new InboxRulesetControllerApi(config);
            var inboxId = new Guid?(); // Guid? | Optional inbox id to attach ruleset to (optional) 

            try
            {
                // Delete inbox rulesets
                apiInstance.DeleteInboxRulesets(inboxId);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling InboxRulesetControllerApi.DeleteInboxRulesets: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
inboxIdGuid?Optional inbox id to attach ruleset to[optional]

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status codeDescriptionResponse headers
204No Content-
401Unauthorized-
403Forbidden-

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetInboxRuleset

InboxRulesetDto GetInboxRuleset (Guid id)

Get an inbox ruleset

Get inbox ruleset

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;

namespace Example
{
    public class GetInboxRulesetExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new InboxRulesetControllerApi(config);
            var id = new Guid(); // Guid | ID of inbox ruleset

            try
            {
                // Get an inbox ruleset
                InboxRulesetDto result = apiInstance.GetInboxRuleset(id);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling InboxRulesetControllerApi.GetInboxRuleset: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
idGuidID of inbox ruleset

Return type

InboxRulesetDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200OK-
401Unauthorized-
403Forbidden-
404Not Found-

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetInboxRulesets

PageInboxRulesetDto GetInboxRulesets (DateTime? before = null, Guid? inboxId = null, int? page = null, string searchFilter = null, DateTime? since = null, int? size = null, string sort = null)

List inbox rulesets

List all rulesets attached to an inbox

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;

namespace Example
{
    public class GetInboxRulesetsExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new InboxRulesetControllerApi(config);
            var before = 2013-10-20T19:20:30+01:00;  // DateTime? | Filter by created at before the given timestamp (optional) 
            var inboxId = new Guid?(); // Guid? | Optional inbox id to get rulesets from (optional) 
            var page = 56;  // int? | Optional page  in inbox ruleset list pagination (optional)  (default to 0)
            var searchFilter = searchFilter_example;  // string | Optional search filter (optional) 
            var since = 2013-10-20T19:20:30+01:00;  // DateTime? | Filter by created at after the given timestamp (optional) 
            var size = 56;  // int? | Optional page size in inbox ruleset list pagination (optional)  (default to 20)
            var sort = sort_example;  // string | Optional createdAt sort direction ASC or DESC (optional)  (default to ASC)

            try
            {
                // List inbox rulesets
                PageInboxRulesetDto result = apiInstance.GetInboxRulesets(before, inboxId, page, searchFilter, since, size, sort);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling InboxRulesetControllerApi.GetInboxRulesets: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
beforeDateTime?Filter by created at before the given timestamp[optional]
inboxIdGuid?Optional inbox id to get rulesets from[optional]
pageint?Optional page in inbox ruleset list pagination[optional] [default to 0]
searchFilterstringOptional search filter[optional]
sinceDateTime?Filter by created at after the given timestamp[optional]
sizeint?Optional page size in inbox ruleset list pagination[optional] [default to 20]
sortstringOptional createdAt sort direction ASC or DESC[optional] [default to ASC]

Return type

PageInboxRulesetDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200OK-
401Unauthorized-
403Forbidden-
404Not Found-

[Back to top] [Back to API list] [Back to Model list] [Back to ]

TestInboxRuleset

InboxRulesetTestResult TestInboxRuleset (Guid id, InboxRulesetTestOptions inboxRulesetTestOptions)

Test an inbox ruleset

Test an inbox ruleset

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;

namespace Example
{
    public class TestInboxRulesetExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new InboxRulesetControllerApi(config);
            var id = new Guid(); // Guid | ID of inbox ruleset
            var inboxRulesetTestOptions = new InboxRulesetTestOptions(); // InboxRulesetTestOptions | inboxRulesetTestOptions

            try
            {
                // Test an inbox ruleset
                InboxRulesetTestResult result = apiInstance.TestInboxRuleset(id, inboxRulesetTestOptions);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling InboxRulesetControllerApi.TestInboxRuleset: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
idGuidID of inbox ruleset
inboxRulesetTestOptionsInboxRulesetTestOptionsinboxRulesetTestOptions

Return type

InboxRulesetTestResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200OK-
201Created-
401Unauthorized-
403Forbidden-
404Not Found-

[Back to top] [Back to API list] [Back to Model list] [Back to ]

TestInboxRulesetsForInbox

InboxRulesetTestResult TestInboxRulesetsForInbox (Guid inboxId, InboxRulesetTestOptions inboxRulesetTestOptions)

Test inbox rulesets for inbox

Test inbox rulesets for inbox

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;

namespace Example
{
    public class TestInboxRulesetsForInboxExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new InboxRulesetControllerApi(config);
            var inboxId = new Guid(); // Guid | ID of inbox
            var inboxRulesetTestOptions = new InboxRulesetTestOptions(); // InboxRulesetTestOptions | inboxRulesetTestOptions

            try
            {
                // Test inbox rulesets for inbox
                InboxRulesetTestResult result = apiInstance.TestInboxRulesetsForInbox(inboxId, inboxRulesetTestOptions);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling InboxRulesetControllerApi.TestInboxRulesetsForInbox: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
inboxIdGuidID of inbox
inboxRulesetTestOptionsInboxRulesetTestOptionsinboxRulesetTestOptions

Return type

InboxRulesetTestResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200OK-
201Created-
401Unauthorized-
403Forbidden-
404Not Found-

[Back to top] [Back to API list] [Back to Model list] [Back to ]

TestNewInboxRuleset

InboxRulesetTestResult TestNewInboxRuleset (TestNewInboxRulesetOptions testNewInboxRulesetOptions)

Test new inbox ruleset

Test new inbox ruleset

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;

namespace Example
{
    public class TestNewInboxRulesetExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new InboxRulesetControllerApi(config);
            var testNewInboxRulesetOptions = new TestNewInboxRulesetOptions(); // TestNewInboxRulesetOptions | testNewInboxRulesetOptions

            try
            {
                // Test new inbox ruleset
                InboxRulesetTestResult result = apiInstance.TestNewInboxRuleset(testNewInboxRulesetOptions);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling InboxRulesetControllerApi.TestNewInboxRuleset: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
testNewInboxRulesetOptionsTestNewInboxRulesetOptionstestNewInboxRulesetOptions

Return type

InboxRulesetTestResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200OK-
204No Content-
401Unauthorized-
403Forbidden-

[Back to top] [Back to API list] [Back to Model list] [Back to ]