Package 

Class InboxControllerApi

    • Constructor Detail

      • InboxControllerApi

        InboxControllerApi(String xApiKey, String basePath)
    • Method Detail

      • createInbox

         final InboxDto createInbox(String emailAddress, List<String> tags, String name, String description, Boolean useDomainPool, Boolean favourite, OffsetDateTime expiresAt, Long expiresIn, Boolean allowTeamAccess, String inboxType)

        Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either &#x60;SMTP&#x60; or &#x60;HTTP&#x60; inboxes. Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty.

        Parameters:
        emailAddress - A custom email address to use with the inbox.
        tags - Tags that inbox has been tagged with.
        name - Optional name of the inbox.
        description - Optional description of the inbox for labelling purposes.
        useDomainPool - Use the MailSlurp domain name pool with this inbox when creating the email address.
        favourite - Is the inbox a favorite.
        expiresAt - Optional inbox expiration date.
        expiresIn - Number of milliseconds that inbox should exist for (optional)
        allowTeamAccess - DEPRECATED (team access is always true).
        inboxType - HTTP (default) or SMTP inbox type.
      • createInboxRequestConfig

         final RequestConfig createInboxRequestConfig(String emailAddress, List<String> tags, String name, String description, Boolean useDomainPool, Boolean favourite, OffsetDateTime expiresAt, Long expiresIn, Boolean allowTeamAccess, String inboxType)

        To obtain the request config of the operation createInbox

        Parameters:
        emailAddress - A custom email address to use with the inbox.
        tags - Tags that inbox has been tagged with.
        name - Optional name of the inbox.
        description - Optional description of the inbox for labelling purposes.
        useDomainPool - Use the MailSlurp domain name pool with this inbox when creating the email address.
        favourite - Is the inbox a favorite.
        expiresAt - Optional inbox expiration date.
        expiresIn - Number of milliseconds that inbox should exist for (optional)
        allowTeamAccess - DEPRECATED (team access is always true).
        inboxType - HTTP (default) or SMTP inbox type.
      • createInboxWithDefaults

         final InboxDto createInboxWithDefaults()

        Create an inbox with default options. Uses MailSlurp domain pool address and is private.

      • createInboxWithOptions

         final InboxDto createInboxWithOptions(CreateInboxDto createInboxDto)

        Create an inbox with options. Extended options for inbox creation. Additional endpoint that allows inbox creation with request body options. Can be more flexible that other methods for some clients.

      • deleteAllInboxes

         final Unit deleteAllInboxes()

        Delete all inboxes Permanently delete all inboxes and associated email addresses. This will also delete all emails within the inboxes. Be careful as inboxes cannot be recovered once deleted. Note: deleting inboxes will not impact your usage limits. Monthly inbox creation limits are based on how many inboxes were created in the last 30 days, not how many inboxes you currently have.

      • deleteInbox

         final Unit deleteInbox(UUID inboxId)

        Delete inbox Permanently delete an inbox and associated email address as well as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request.

      • doesInboxExist

         final InboxExistsDto doesInboxExist(String emailAddress)

        Does inbox exist Check if inboxes exist by email address. Useful if you are sending emails to mailslurp addresses

        Parameters:
        emailAddress - Email address
      • flushExpired

         final FlushExpiredInboxesResult flushExpired(OffsetDateTime before)

        Remove expired inboxes Remove any expired inboxes for your account (instead of waiting for scheduled removal on server)

        Parameters:
        before - Optional expired at before flag to flush expired inboxes that have expired before the given time (optional)
      • flushExpiredRequestConfig

         final RequestConfig flushExpiredRequestConfig(OffsetDateTime before)

        To obtain the request config of the operation flushExpired

        Parameters:
        before - Optional expired at before flag to flush expired inboxes that have expired before the given time (optional)
      • getAllInboxes

         final PageInboxProjection getAllInboxes(Integer page, Integer size, String sort, Boolean favourite, String search, String tag, Boolean teamAccess, OffsetDateTime since, OffsetDateTime before)

        List All Inboxes Paginated List inboxes in paginated form. The results are available on the &#x60;content&#x60; property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative &#x60;getInboxes&#x60; method returns a full list of inboxes but is limited to 100 results.

        Parameters:
        page - Optional page index in list pagination (optional, default to 0)
        size - Optional page size in list pagination (optional, default to 20)
        sort - Optional createdAt sort direction ASC or DESC (optional, default to ASC)
        favourite - Optionally filter results for favourites only (optional, default to false)
        search - Optionally filter by search words partial matching ID, tags, name, and email address (optional)
        tag - Optionally filter by tags.
        teamAccess - DEPRECATED.
        since - Optional filter by created after given date time (optional)
        before - Optional filter by created before given date time (optional)
      • getAllInboxesRequestConfig

         final RequestConfig getAllInboxesRequestConfig(Integer page, Integer size, String sort, Boolean favourite, String search, String tag, Boolean teamAccess, OffsetDateTime since, OffsetDateTime before)

        To obtain the request config of the operation getAllInboxes

        Parameters:
        page - Optional page index in list pagination (optional, default to 0)
        size - Optional page size in list pagination (optional, default to 20)
        sort - Optional createdAt sort direction ASC or DESC (optional, default to ASC)
        favourite - Optionally filter results for favourites only (optional, default to false)
        search - Optionally filter by search words partial matching ID, tags, name, and email address (optional)
        tag - Optionally filter by tags.
        teamAccess - DEPRECATED.
        since - Optional filter by created after given date time (optional)
        before - Optional filter by created before given date time (optional)
      • getEmails

         final List<EmailPreview> getEmails(UUID inboxId, Integer aliasForLimitAssessedFirstBeforeAssessingAnyPassedLimit, Integer limit, String sortTheResultsByReceivedDateAndDirectionASCOrDESC, Long retryTimeout, Long delayTimeout, Long minCount, Boolean unreadOnly, OffsetDateTime before, OffsetDateTime since)

        Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead. List emails that an inbox has received. Only emails that are sent to the inbox&#39;s email address will appear in the inbox. It may take several seconds for any email you send to an inbox&#39;s email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the &#x60;minCount&#x60; parameter. The server will retry the inbox database until the &#x60;minCount&#x60; is satisfied or the &#x60;retryTimeout&#x60; is reached

        Parameters:
        inboxId - Id of inbox that emails belongs to
        aliasForLimitAssessedFirstBeforeAssessingAnyPassedLimit - (optional)
        limit - Limit the result set, ordered by received date time sort direction.
        sortTheResultsByReceivedDateAndDirectionASCOrDESC - (optional)
        retryTimeout - Maximum milliseconds to spend retrying inbox database until minCount emails are returned (optional)
        delayTimeout - (optional)
        minCount - Minimum acceptable email count.
        unreadOnly - (optional)
        before - Exclude emails received after this ISO 8601 date time (optional)
        since - Exclude emails received before this ISO 8601 date time (optional)
      • getEmailsRequestConfig

         final RequestConfig getEmailsRequestConfig(UUID inboxId, Integer aliasForLimitAssessedFirstBeforeAssessingAnyPassedLimit, Integer limit, String sortTheResultsByReceivedDateAndDirectionASCOrDESC, Long retryTimeout, Long delayTimeout, Long minCount, Boolean unreadOnly, OffsetDateTime before, OffsetDateTime since)

        To obtain the request config of the operation getEmails

        Parameters:
        inboxId - Id of inbox that emails belongs to
        aliasForLimitAssessedFirstBeforeAssessingAnyPassedLimit - (optional)
        limit - Limit the result set, ordered by received date time sort direction.
        sortTheResultsByReceivedDateAndDirectionASCOrDESC - (optional)
        retryTimeout - Maximum milliseconds to spend retrying inbox database until minCount emails are returned (optional)
        delayTimeout - (optional)
        minCount - Minimum acceptable email count.
        unreadOnly - (optional)
        before - Exclude emails received after this ISO 8601 date time (optional)
        since - Exclude emails received before this ISO 8601 date time (optional)
      • getInbox

         final InboxDto getInbox(UUID inboxId)

        Get Inbox. Returns properties of an inbox. Returns an inbox&#39;s properties, including its email address and ID.

      • getInboxEmailCount

         final CountDto getInboxEmailCount(UUID inboxId)

        Get email count in inbox

        Parameters:
        inboxId - Id of inbox that emails belongs to
      • getInboxEmailsPaginated

         final PageEmailPreview getInboxEmailsPaginated(UUID inboxId, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before)

        Get inbox emails paginated Get a paginated list of emails in an inbox. Does not hold connections open.

        Parameters:
        inboxId - Id of inbox that emails belongs to
        page - Optional page index in inbox emails list pagination (optional, default to 0)
        size - Optional page size in inbox emails list pagination (optional, default to 20)
        sort - Optional createdAt sort direction ASC or DESC (optional, default to ASC)
        since - Optional filter by received after given date time (optional)
        before - Optional filter by received before given date time (optional)
      • getInboxEmailsPaginatedRequestConfig

         final RequestConfig getInboxEmailsPaginatedRequestConfig(UUID inboxId, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before)

        To obtain the request config of the operation getInboxEmailsPaginated

        Parameters:
        inboxId - Id of inbox that emails belongs to
        page - Optional page index in inbox emails list pagination (optional, default to 0)
        size - Optional page size in inbox emails list pagination (optional, default to 20)
        sort - Optional createdAt sort direction ASC or DESC (optional, default to ASC)
        since - Optional filter by received after given date time (optional)
        before - Optional filter by received before given date time (optional)
      • getInboxSentEmails

         final PageSentEmailProjection getInboxSentEmails(UUID inboxId, Integer page, Integer size, String sort, String searchFilter, OffsetDateTime since, OffsetDateTime before)

        Get Inbox Sent Emails Returns an inbox&#39;s sent email receipts. Call individual sent email endpoints for more details. Note for privacy reasons the full body of sent emails is never stored. An MD5 hash hex is available for comparison instead.

        Parameters:
        page - Optional page index in inbox sent email list pagination (optional, default to 0)
        size - Optional page size in inbox sent email list pagination (optional, default to 20)
        sort - Optional createdAt sort direction ASC or DESC (optional, default to ASC)
        searchFilter - Optional sent email search (optional)
        since - Optional filter by sent after given date time (optional)
        before - Optional filter by sent before given date time (optional)
      • getInboxSentEmailsRequestConfig

         final RequestConfig getInboxSentEmailsRequestConfig(UUID inboxId, Integer page, Integer size, String sort, String searchFilter, OffsetDateTime since, OffsetDateTime before)

        To obtain the request config of the operation getInboxSentEmails

        Parameters:
        page - Optional page index in inbox sent email list pagination (optional, default to 0)
        size - Optional page size in inbox sent email list pagination (optional, default to 20)
        sort - Optional createdAt sort direction ASC or DESC (optional, default to ASC)
        searchFilter - Optional sent email search (optional)
        since - Optional filter by sent after given date time (optional)
        before - Optional filter by sent before given date time (optional)
      • getInboxes

        @Deprecated(message = This operation is deprecated.) final List<InboxDto> getInboxes(Integer size, String sort, OffsetDateTime since, OffsetDateTime before)

        List Inboxes and email addresses List the inboxes you have created. Note use of the more advanced &#x60;getAllEmails&#x60; is recommended and allows paginated access using a limit and sort parameter.

        Parameters:
        size - Optional result size limit.
        sort - Optional createdAt sort direction ASC or DESC (optional, default to ASC)
        since - Optional filter by created after given date time (optional)
        before - Optional filter by created before given date time (optional)
      • getInboxesRequestConfig

        @Deprecated(message = This operation is deprecated.) final RequestConfig getInboxesRequestConfig(Integer size, String sort, OffsetDateTime since, OffsetDateTime before)

        To obtain the request config of the operation getInboxes

        Parameters:
        size - Optional result size limit.
        sort - Optional createdAt sort direction ASC or DESC (optional, default to ASC)
        since - Optional filter by created after given date time (optional)
        before - Optional filter by created before given date time (optional)
      • getOrganizationInboxes

         final PageOrganizationInboxProjection getOrganizationInboxes(Integer page, Integer size, String sort, String searchFilter, OffsetDateTime since, OffsetDateTime before)

        List Organization Inboxes Paginated List organization inboxes in paginated form. These are inboxes created with &#x60;allowTeamAccess&#x60; flag enabled. Organization inboxes are &#x60;readOnly&#x60; for non-admin users. The results are available on the &#x60;content&#x60; property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time).

        Parameters:
        page - Optional page index in list pagination (optional, default to 0)
        size - Optional page size in list pagination (optional, default to 20)
        sort - Optional createdAt sort direction ASC or DESC (optional, default to ASC)
        searchFilter - Optional search filter (optional)
        since - Optional filter by created after given date time (optional)
        before - Optional filter by created before given date time (optional)
      • getOrganizationInboxesRequestConfig

         final RequestConfig getOrganizationInboxesRequestConfig(Integer page, Integer size, String sort, String searchFilter, OffsetDateTime since, OffsetDateTime before)

        To obtain the request config of the operation getOrganizationInboxes

        Parameters:
        page - Optional page index in list pagination (optional, default to 0)
        size - Optional page size in list pagination (optional, default to 20)
        sort - Optional createdAt sort direction ASC or DESC (optional, default to ASC)
        searchFilter - Optional search filter (optional)
        since - Optional filter by created after given date time (optional)
        before - Optional filter by created before given date time (optional)
      • listInboxRulesets

         final PageInboxRulesetDto listInboxRulesets(UUID inboxId, Integer page, Integer size, String sort, String searchFilter, OffsetDateTime since, OffsetDateTime before)

        List inbox rulesets List all rulesets attached to an inbox

        Parameters:
        page - Optional page index in inbox ruleset list pagination (optional, default to 0)
        size - Optional page size in inbox ruleset list pagination (optional, default to 20)
        sort - Optional createdAt sort direction ASC or DESC (optional, default to ASC)
        searchFilter - Optional search filter (optional)
        since - Optional filter by created after given date time (optional)
        before - Optional filter by created before given date time (optional)
      • listInboxRulesetsRequestConfig

         final RequestConfig listInboxRulesetsRequestConfig(UUID inboxId, Integer page, Integer size, String sort, String searchFilter, OffsetDateTime since, OffsetDateTime before)

        To obtain the request config of the operation listInboxRulesets

        Parameters:
        page - Optional page index in inbox ruleset list pagination (optional, default to 0)
        size - Optional page size in inbox ruleset list pagination (optional, default to 20)
        sort - Optional createdAt sort direction ASC or DESC (optional, default to ASC)
        searchFilter - Optional search filter (optional)
        since - Optional filter by created after given date time (optional)
        before - Optional filter by created before given date time (optional)
      • listInboxTrackingPixels

         final PageTrackingPixelProjection listInboxTrackingPixels(UUID inboxId, Integer page, Integer size, String sort, String searchFilter, OffsetDateTime since, OffsetDateTime before)

        List inbox tracking pixels List all tracking pixels sent from an inbox

        Parameters:
        page - Optional page index in inbox tracking pixel list pagination (optional, default to 0)
        size - Optional page size in inbox tracking pixel list pagination (optional, default to 20)
        sort - Optional createdAt sort direction ASC or DESC (optional, default to ASC)
        searchFilter - Optional search filter (optional)
        since - Optional filter by created after given date time (optional)
        before - Optional filter by created before given date time (optional)
      • listInboxTrackingPixelsRequestConfig

         final RequestConfig listInboxTrackingPixelsRequestConfig(UUID inboxId, Integer page, Integer size, String sort, String searchFilter, OffsetDateTime since, OffsetDateTime before)

        To obtain the request config of the operation listInboxTrackingPixels

        Parameters:
        page - Optional page index in inbox tracking pixel list pagination (optional, default to 0)
        size - Optional page size in inbox tracking pixel list pagination (optional, default to 20)
        sort - Optional createdAt sort direction ASC or DESC (optional, default to ASC)
        searchFilter - Optional search filter (optional)
        since - Optional filter by created after given date time (optional)
        before - Optional filter by created before given date time (optional)
      • sendEmail

         final Unit sendEmail(UUID inboxId, SendEmailOptions sendEmailOptions)

        Send Email Send an email from an inbox&#39;s email address. The request body should contain the &#x60;SendEmailOptions&#x60; that include recipients, attachments, body etc. See &#x60;SendEmailOptions&#x60; for all available properties. Note the &#x60;inboxId&#x60; refers to the inbox&#39;s id not the inbox&#39;s email address. See https://www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method &#x60;sendEmailAndConfirm&#x60;.

        Parameters:
        inboxId - ID of the inbox you want to send the email from
      • sendEmailAndConfirm

         final SentEmailDto sendEmailAndConfirm(UUID inboxId, SendEmailOptions sendEmailOptions)

        Send email and return sent confirmation Sister method for standard &#x60;sendEmail&#x60; method with the benefit of returning a &#x60;SentEmail&#x60; entity confirming the successful sending of the email with a link to the sent object created for it.

        Parameters:
        inboxId - ID of the inbox you want to send the email from
      • sendTestEmail

         final Unit sendTestEmail(UUID inboxId)

        Send a test email to inbox Send an inbox a test email to test email receiving is working