Package 

Class InboxControllerApi

    • Constructor Detail

      • InboxControllerApi

        InboxControllerApi(String xApiKey, String basePath)
    • Method Detail

      • createInbox

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

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

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

        To obtain the request config of the operation createInbox

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

         final InboxRulesetDto createInboxRuleset(UUID inboxId, CreateInboxRulesetOptions createInboxRulesetOptions)

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

        Parameters:
        inboxId - inboxId
        createInboxRulesetOptions - createInboxRulesetOptions
      • createInboxWithDefaults

         final Inbox createInboxWithDefaults()

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

      • createInboxWithOptions

         final Inbox 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.

        Parameters:
        createInboxDto - createInboxDto
      • 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.

        Parameters:
        inboxId - inboxId
      • 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(OffsetDateTime before, Boolean favourite, Integer page, String search, OffsetDateTime since, Integer size, String sort, String tag, Boolean teamAccess)

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

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

        To obtain the request config of the operation getAllInboxes

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

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

        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
        before - Exclude emails received after this ISO 8601 date time (optional)
        delayTimeout - delayTimeout (optional)
        limit - Limit the result set, ordered by received date time sort direction.
        minCount - Minimum acceptable email count.
        retryTimeout - Maximum milliseconds to spend retrying inbox database until minCount emails are returned (optional)
        since - Exclude emails received before this ISO 8601 date time (optional)
        size - Alias for limit.
        sort - Sort the results by received date and direction ASC or DESC (optional)
        unreadOnly - unreadOnly (optional)
      • getEmailsRequestConfig

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

        To obtain the request config of the operation getEmails

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

         final Inbox getInbox(UUID inboxId)

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

        Parameters:
        inboxId - inboxId
      • getInboxEmailsPaginated

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

        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
        before - Optional filter by received before given date time (optional)
        page - Optional page index in inbox emails list pagination (optional, default to 0)
        since - Optional filter by received after given date time (optional)
        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)
      • getInboxEmailsPaginatedRequestConfig

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

        To obtain the request config of the operation getInboxEmailsPaginated

        Parameters:
        inboxId - Id of inbox that emails belongs to
        before - Optional filter by received before given date time (optional)
        page - Optional page index in inbox emails list pagination (optional, default to 0)
        since - Optional filter by received after given date time (optional)
        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)
      • getInboxSentEmails

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

        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:
        inboxId - inboxId
        before - Optional filter by sent before given date time (optional)
        page - Optional page index in inbox sent email list pagination (optional, default to 0)
        searchFilter - Optional sent email search (optional)
        since - Optional filter by sent after given date time (optional)
        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)
      • getInboxSentEmailsRequestConfig

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

        To obtain the request config of the operation getInboxSentEmails

        Parameters:
        inboxId - inboxId
        before - Optional filter by sent before given date time (optional)
        page - Optional page index in inbox sent email list pagination (optional, default to 0)
        searchFilter - Optional sent email search (optional)
        since - Optional filter by sent after given date time (optional)
        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)
      • getInboxes

         final List<Inbox> getInboxes(OffsetDateTime before, OffsetDateTime since, Integer size, String sort)

        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:
        before - Optional filter by created before given date time (optional)
        since - Optional filter by created after given date time (optional)
        size - Optional result size limit.
        sort - Optional createdAt sort direction ASC or DESC (optional, default to ASC)
      • getInboxesRequestConfig

         final RequestConfig getInboxesRequestConfig(OffsetDateTime before, OffsetDateTime since, Integer size, String sort)

        To obtain the request config of the operation getInboxes

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

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

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

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

        To obtain the request config of the operation getOrganizationInboxes

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

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

        List inbox rulesets List all rulesets attached to an inbox

        Parameters:
        inboxId - inboxId
        before - Optional filter by created before given date time (optional)
        page - Optional page index in inbox ruleset list pagination (optional, default to 0)
        searchFilter - Optional search filter (optional)
        since - Optional filter by created after given date time (optional)
        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)
      • listInboxRulesetsRequestConfig

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

        To obtain the request config of the operation listInboxRulesets

        Parameters:
        inboxId - inboxId
        before - Optional filter by created before given date time (optional)
        page - Optional page index in inbox ruleset list pagination (optional, default to 0)
        searchFilter - Optional search filter (optional)
        since - Optional filter by created after given date time (optional)
        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)
      • listInboxTrackingPixels

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

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

        Parameters:
        inboxId - inboxId
        before - Optional filter by created before given date time (optional)
        page - Optional page index in inbox tracking pixel list pagination (optional, default to 0)
        searchFilter - Optional search filter (optional)
        since - Optional filter by created after given date time (optional)
        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)
      • listInboxTrackingPixelsRequestConfig

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

        To obtain the request config of the operation listInboxTrackingPixels

        Parameters:
        inboxId - inboxId
        before - Optional filter by created before given date time (optional)
        page - Optional page index in inbox tracking pixel list pagination (optional, default to 0)
        searchFilter - Optional search filter (optional)
        since - Optional filter by created after given date time (optional)
        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)
      • 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
        sendEmailOptions - Options for the email (optional)
      • sendEmailRequestConfig

         final RequestConfig sendEmailRequestConfig(UUID inboxId, SendEmailOptions sendEmailOptions)

        To obtain the request config of the operation sendEmail

        Parameters:
        inboxId - ID of the inbox you want to send the email from
        sendEmailOptions - Options for the email (optional)
      • 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
        sendEmailOptions - Options for the email (optional)
      • sendEmailAndConfirmRequestConfig

         final RequestConfig sendEmailAndConfirmRequestConfig(UUID inboxId, SendEmailOptions sendEmailOptions)

        To obtain the request config of the operation sendEmailAndConfirm

        Parameters:
        inboxId - ID of the inbox you want to send the email from
        sendEmailOptions - Options for the email (optional)
      • sendTestEmail

         final Unit sendTestEmail(UUID inboxId)

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

        Parameters:
        inboxId - inboxId
      • setInboxFavourited

         final Inbox setInboxFavourited(UUID inboxId, SetInboxFavouritedOptions setInboxFavouritedOptions)

        Set inbox favourited state Set and return new favourite state for an inbox

        Parameters:
        inboxId - inboxId
        setInboxFavouritedOptions - setInboxFavouritedOptions
      • updateInbox

         final Inbox updateInbox(UUID inboxId, UpdateInboxOptions updateInboxOptions)

        Update Inbox. Change name and description. Email address is not editable. Update editable fields on an inbox

        Parameters:
        inboxId - inboxId
        updateInboxOptions - updateInboxOptions