MailSlurpInboxRulesetControllerApi

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

MailSlurpModelsInboxRulesetDto createNewInboxRuleset($create_inbox_ruleset_options, $inbox_id)

Create an inbox ruleset

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

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new MailSlurpApiInboxRulesetControllerApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
    // This is optional, `GuzzleHttpClient` will be used as default.
    new GuzzleHttpClient(),
    $config
);
$create_inbox_ruleset_options = new MailSlurpModelsCreateInboxRulesetOptions(); // MailSlurpModelsCreateInboxRulesetOptions | createInboxRulesetOptions
$inbox_id = 'inbox_id_example'; // string | Inbox id to attach ruleset to

try {
    $result = $apiInstance->createNewInboxRuleset($create_inbox_ruleset_options, $inbox_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InboxRulesetControllerApi->createNewInboxRuleset: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

NameTypeDescriptionNotes
create_inbox_ruleset_optionsMailSlurpModelsCreateInboxRulesetOptionscreateInboxRulesetOptions
inbox_idstringInbox id to attach ruleset to[optional]

Return type

MailSlurpModelsInboxRulesetDto

Authorization

API_KEY

HTTP request headers

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

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

deleteInboxRuleset

deleteInboxRuleset($id)

Delete an inbox ruleset

Delete inbox ruleset

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new MailSlurpApiInboxRulesetControllerApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
    // This is optional, `GuzzleHttpClient` will be used as default.
    new GuzzleHttpClient(),
    $config
);
$id = 'id_example'; // string | ID of inbox ruleset

try {
    $apiInstance->deleteInboxRuleset($id);
} catch (Exception $e) {
    echo 'Exception when calling InboxRulesetControllerApi->deleteInboxRuleset: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

NameTypeDescriptionNotes
idstringID of inbox ruleset

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

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

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

deleteInboxRulesets

deleteInboxRulesets($inbox_id)

Delete inbox rulesets

Delete inbox rulesets. Accepts optional inboxId filter.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new MailSlurpApiInboxRulesetControllerApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
    // This is optional, `GuzzleHttpClient` will be used as default.
    new GuzzleHttpClient(),
    $config
);
$inbox_id = 'inbox_id_example'; // string | Optional inbox id to attach ruleset to

try {
    $apiInstance->deleteInboxRulesets($inbox_id);
} catch (Exception $e) {
    echo 'Exception when calling InboxRulesetControllerApi->deleteInboxRulesets: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

NameTypeDescriptionNotes
inbox_idstringOptional 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

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

getInboxRuleset

MailSlurpModelsInboxRulesetDto getInboxRuleset($id)

Get an inbox ruleset

Get inbox ruleset

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new MailSlurpApiInboxRulesetControllerApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
    // This is optional, `GuzzleHttpClient` will be used as default.
    new GuzzleHttpClient(),
    $config
);
$id = 'id_example'; // string | ID of inbox ruleset

try {
    $result = $apiInstance->getInboxRuleset($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InboxRulesetControllerApi->getInboxRuleset: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

NameTypeDescriptionNotes
idstringID of inbox ruleset

Return type

MailSlurpModelsInboxRulesetDto

Authorization

API_KEY

HTTP request headers

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

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

getInboxRulesets

MailSlurpModelsPageInboxRulesetDto getInboxRulesets($inbox_id, $page, $search_filter, $size, $sort)

List inbox rulesets

List all rulesets attached to an inbox

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new MailSlurpApiInboxRulesetControllerApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
    // This is optional, `GuzzleHttpClient` will be used as default.
    new GuzzleHttpClient(),
    $config
);
$inbox_id = 'inbox_id_example'; // string | Optional inbox id to get rulesets from
$page = 0; // int | Optional page  in inbox ruleset list pagination
$search_filter = 'search_filter_example'; // string | Optional search filter
$size = 20; // int | Optional page size in inbox ruleset list pagination
$sort = 'ASC'; // string | Optional createdAt sort direction ASC or DESC

try {
    $result = $apiInstance->getInboxRulesets($inbox_id, $page, $search_filter, $size, $sort);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InboxRulesetControllerApi->getInboxRulesets: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

NameTypeDescriptionNotes
inbox_idstringOptional inbox id to get rulesets from[optional]
pageintOptional page in inbox ruleset list pagination[optional] [default to 0]
search_filterstringOptional search filter[optional]
sizeintOptional page size in inbox ruleset list pagination[optional] [default to 20]
sortstringOptional createdAt sort direction ASC or DESC[optional] [default to ‘ASC’]

Return type

MailSlurpModelsPageInboxRulesetDto

Authorization

API_KEY

HTTP request headers

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

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

testInboxRuleset

MailSlurpModelsInboxRulesetTestResult testInboxRuleset($id, $inbox_ruleset_test_options)

Test an inbox ruleset

Test an inbox ruleset

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new MailSlurpApiInboxRulesetControllerApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
    // This is optional, `GuzzleHttpClient` will be used as default.
    new GuzzleHttpClient(),
    $config
);
$id = 'id_example'; // string | ID of inbox ruleset
$inbox_ruleset_test_options = new MailSlurpModelsInboxRulesetTestOptions(); // MailSlurpModelsInboxRulesetTestOptions | inboxRulesetTestOptions

try {
    $result = $apiInstance->testInboxRuleset($id, $inbox_ruleset_test_options);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InboxRulesetControllerApi->testInboxRuleset: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

NameTypeDescriptionNotes
idstringID of inbox ruleset
inbox_ruleset_test_optionsMailSlurpModelsInboxRulesetTestOptionsinboxRulesetTestOptions

Return type

MailSlurpModelsInboxRulesetTestResult

Authorization

API_KEY

HTTP request headers

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

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

testInboxRulesetsForInbox

MailSlurpModelsInboxRulesetTestResult testInboxRulesetsForInbox($inbox_id, $inbox_ruleset_test_options)

Test inbox rulesets for inbox

Test inbox rulesets for inbox

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new MailSlurpApiInboxRulesetControllerApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
    // This is optional, `GuzzleHttpClient` will be used as default.
    new GuzzleHttpClient(),
    $config
);
$inbox_id = 'inbox_id_example'; // string | ID of inbox
$inbox_ruleset_test_options = new MailSlurpModelsInboxRulesetTestOptions(); // MailSlurpModelsInboxRulesetTestOptions | inboxRulesetTestOptions

try {
    $result = $apiInstance->testInboxRulesetsForInbox($inbox_id, $inbox_ruleset_test_options);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InboxRulesetControllerApi->testInboxRulesetsForInbox: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

NameTypeDescriptionNotes
inbox_idstringID of inbox
inbox_ruleset_test_optionsMailSlurpModelsInboxRulesetTestOptionsinboxRulesetTestOptions

Return type

MailSlurpModelsInboxRulesetTestResult

Authorization

API_KEY

HTTP request headers

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

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

testNewInboxRuleset

MailSlurpModelsInboxRulesetTestResult testNewInboxRuleset($test_new_inbox_ruleset_options)

Test new inbox ruleset

Test new inbox ruleset

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new MailSlurpApiInboxRulesetControllerApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
    // This is optional, `GuzzleHttpClient` will be used as default.
    new GuzzleHttpClient(),
    $config
);
$test_new_inbox_ruleset_options = new MailSlurpModelsTestNewInboxRulesetOptions(); // MailSlurpModelsTestNewInboxRulesetOptions | testNewInboxRulesetOptions

try {
    $result = $apiInstance->testNewInboxRuleset($test_new_inbox_ruleset_options);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InboxRulesetControllerApi->testNewInboxRuleset: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

NameTypeDescriptionNotes
test_new_inbox_ruleset_optionsMailSlurpModelsTestNewInboxRulesetOptionstestNewInboxRulesetOptions

Return type

MailSlurpModelsInboxRulesetTestResult

Authorization

API_KEY

HTTP request headers

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

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