MailSlurpExpiredControllerApi

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

MethodHTTP requestDescription
getExpirationDefaultsGET /expired/defaultsGet default expiration settings
getExpiredInboxByInboxIdGET /expired/inbox/{inboxId}Get expired inbox record for a previously existing inbox
getExpiredInboxRecordGET /expired/{expiredId}Get an expired inbox record
getExpiredInboxesGET /expiredList records of expired inboxes

getExpirationDefaults

MailSlurpModelsExpirationDefaults getExpirationDefaults()

Get default expiration settings

Return default times used for inbox expiration

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 MailSlurpApiExpiredControllerApi(
    // 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
);

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

Parameters

This endpoint does not need any parameter.

Return type

MailSlurpModelsExpirationDefaults

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 ]

getExpiredInboxByInboxId

MailSlurpModelsExpiredInboxDto getExpiredInboxByInboxId($inbox_id)

Get expired inbox record for a previously existing inbox

Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId

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 MailSlurpApiExpiredControllerApi(
    // 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 you want to retrieve (not the inbox ID)

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

Parameters

NameTypeDescriptionNotes
inbox_idstringID of inbox you want to retrieve (not the inbox ID)

Return type

MailSlurpModelsExpiredInboxDto

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 ]

getExpiredInboxRecord

MailSlurpModelsExpiredInboxDto getExpiredInboxRecord($expired_id)

Get an expired inbox record

Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties

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 MailSlurpApiExpiredControllerApi(
    // 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
);
$expired_id = 'expired_id_example'; // string | ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId)

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

Parameters

NameTypeDescriptionNotes
expired_idstringID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId)

Return type

MailSlurpModelsExpiredInboxDto

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 ]

getExpiredInboxes

MailSlurpModelsPageExpiredInboxRecordProjection getExpiredInboxes($before, $page, $since, $size, $sort)

List records of expired inboxes

Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties

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 MailSlurpApiExpiredControllerApi(
    // 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
);
$before = new DateTime("2013-10-20T19:20:30+01:00"); // DateTime | Filter by created at before the given timestamp
$page = 0; // int | Optional page  in inbox sent email list pagination
$since = new DateTime("2013-10-20T19:20:30+01:00"); // DateTime | Filter by created at after the given timestamp
$size = 20; // int | Optional page size in inbox sent email list pagination
$sort = 'ASC'; // string | Optional createdAt sort direction ASC or DESC

try {
    $result = $apiInstance->getExpiredInboxes($before, $page, $since, $size, $sort);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExpiredControllerApi->getExpiredInboxes: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

NameTypeDescriptionNotes
beforeDateTimeFilter by created at before the given timestamp[optional]
pageintOptional page in inbox sent email list pagination[optional] [default to 0]
sinceDateTimeFilter by created at after the given timestamp[optional]
sizeintOptional page size in inbox sent email list pagination[optional] [default to 20]
sortstringOptional createdAt sort direction ASC or DESC[optional] [default to ‘ASC’]

Return type

MailSlurpModelsPageExpiredInboxRecordProjection

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 ]