# mailslurp.Api.ExpiredControllerApi

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

Method HTTP request Description
GetExpirationDefaults GET /expired/defaults Get default expiration settings
GetExpiredInboxByInboxId GET /expired/inbox/{inboxId} Get expired inbox record for a previously existing inbox
GetExpiredInboxRecord GET /expired/{expiredId} Get an expired inbox record
GetExpiredInboxes GET /expired List records of expired inboxes

# GetExpirationDefaults

ExpirationDefaults GetExpirationDefaults ()

Get default expiration settings

Return default times used for inbox expiration

# Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
    public class GetExpirationDefaultsExample
    {
        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 ExpiredControllerApi(config);
            try
            {
                // Get default expiration settings
                ExpirationDefaults result = apiInstance.GetExpirationDefaults();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ExpiredControllerApi.GetExpirationDefaults: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

# Parameters

This endpoint does not need any parameter.

# Return type

ExpirationDefaults

# Authorization

API_KEY

# HTTP request headers

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

# HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -
403 Forbidden -
404 Not Found -

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

# GetExpiredInboxByInboxId

ExpiredInboxDto GetExpiredInboxByInboxId (Guid inboxId)

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

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
    public class GetExpiredInboxByInboxIdExample
    {
        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 ExpiredControllerApi(config);
            var inboxId = new Guid(); // Guid | ID of inbox you want to retrieve (not the inbox ID)
            try
            {
                // Get expired inbox record for a previously existing inbox
                ExpiredInboxDto result = apiInstance.GetExpiredInboxByInboxId(inboxId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ExpiredControllerApi.GetExpiredInboxByInboxId: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

# Parameters

Name Type Description Notes
inboxId Guid ID of inbox you want to retrieve (not the inbox ID)

# Return type

ExpiredInboxDto

# Authorization

API_KEY

# HTTP request headers

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

# HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -
403 Forbidden -
404 Not Found -

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

# GetExpiredInboxRecord

ExpiredInboxDto GetExpiredInboxRecord (Guid expiredId)

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

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
    public class GetExpiredInboxRecordExample
    {
        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 ExpiredControllerApi(config);
            var expiredId = new Guid(); // Guid | 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
            {
                // Get an expired inbox record
                ExpiredInboxDto result = apiInstance.GetExpiredInboxRecord(expiredId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ExpiredControllerApi.GetExpiredInboxRecord: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

# Parameters

Name Type Description Notes
expiredId Guid 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)

# Return type

ExpiredInboxDto

# Authorization

API_KEY

# HTTP request headers

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

# HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -
403 Forbidden -
404 Not Found -

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

# GetExpiredInboxes

PageExpiredInboxRecordProjection GetExpiredInboxes (int? page = null, int? size = null, string sort = null)

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

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
    public class GetExpiredInboxesExample
    {
        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 ExpiredControllerApi(config);
            var page = 56;  // int? | Optional page index in inbox sent email list pagination (optional)  (default to 0)
            var size = 56;  // int? | Optional page size in inbox sent email list pagination (optional)  (default to 20)
            var sort = sort_example;  // string | Optional createdAt sort direction ASC or DESC (optional)  (default to ASC)
            try
            {
                // List records of expired inboxes
                PageExpiredInboxRecordProjection result = apiInstance.GetExpiredInboxes(page, size, sort);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ExpiredControllerApi.GetExpiredInboxes: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

# Parameters

Name Type Description Notes
page int? Optional page index in inbox sent email list pagination [optional] [default to 0]
size int? Optional page size in inbox sent email list pagination [optional] [default to 20]
sort string Optional createdAt sort direction ASC or DESC [optional] [default to ASC]

# Return type

PageExpiredInboxRecordProjection

# Authorization

API_KEY

# HTTP request headers

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

# HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -
403 Forbidden -
404 Not Found -

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