-
public final class InboxControllerApi extends ApiClient
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classInboxControllerApi.Companion
-
Constructor Summary
Constructors Constructor Description InboxControllerApi(String xApiKey, String basePath)
-
Method Summary
Modifier and Type Method Description final StringgetBaseUrl()final InboxcreateInbox(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. final RequestConfigcreateInboxRequestConfig(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 final InboxcreateInboxWithDefaults()Create an inbox with default options. final RequestConfigcreateInboxWithDefaultsRequestConfig()To obtain the request config of the operation createInboxWithDefaults final InboxcreateInboxWithOptions(CreateInboxDto createInboxDto)Create an inbox with options. final RequestConfigcreateInboxWithOptionsRequestConfig(CreateInboxDto createInboxDto)To obtain the request config of the operation createInboxWithOptions final UnitdeleteAllInboxes()Delete all inboxes Permanently delete all inboxes and associated email addresses. final RequestConfigdeleteAllInboxesRequestConfig()To obtain the request config of the operation deleteAllInboxes final UnitdeleteInbox(UUID inboxId)Delete inbox Permanently delete an inbox and associated email address as well as all emails within the given inbox. final RequestConfigdeleteInboxRequestConfig(UUID inboxId)To obtain the request config of the operation deleteInbox final PageInboxProjectiongetAllInboxes(Boolean favourite, Integer page, String search, Integer size, String sort, String tag, Boolean teamAccess)List All Inboxes Paginated List inboxes in paginated form. final RequestConfiggetAllInboxesRequestConfig(Boolean favourite, Integer page, String search, Integer size, String sort, String tag, Boolean teamAccess)To obtain the request config of the operation getAllInboxes final List<EmailPreview>getEmails(UUID inboxId, Integer limit, Long minCount, Long retryTimeout, OffsetDateTime since, Integer size, String sort)Get emails in an Inbox. final RequestConfiggetEmailsRequestConfig(UUID inboxId, Integer limit, Long minCount, Long retryTimeout, OffsetDateTime since, Integer size, String sort)To obtain the request config of the operation getEmails final InboxgetInbox(UUID inboxId)Get Inbox. final RequestConfiggetInboxRequestConfig(UUID inboxId)To obtain the request config of the operation getInbox final PageEmailPreviewgetInboxEmailsPaginated(UUID inboxId, Integer page, Integer size, String sort)Get inbox emails paginated Get a paginated list of emails in an inbox. final RequestConfiggetInboxEmailsPaginatedRequestConfig(UUID inboxId, Integer page, Integer size, String sort)To obtain the request config of the operation getInboxEmailsPaginated final PageSentEmailProjectiongetInboxSentEmails(UUID inboxId, Integer page, Integer size, String sort)Get Inbox Sent Emails Returns an inbox's sent email receipts. final RequestConfiggetInboxSentEmailsRequestConfig(UUID inboxId, Integer page, Integer size, String sort)To obtain the request config of the operation getInboxSentEmails final List<String>getInboxTags()Get inbox tags Get all inbox tags final RequestConfiggetInboxTagsRequestConfig()To obtain the request config of the operation getInboxTags final List<Inbox>getInboxes(Integer size, String sort)List Inboxes and email eddresses List the inboxes you have created. final RequestConfiggetInboxesRequestConfig(Integer size, String sort)To obtain the request config of the operation getInboxes final PageOrganizationInboxProjectiongetOrganizationInboxes(Integer page, Integer size, String sort)List Organization Inboxes Paginated List organization inboxes in paginated form. final RequestConfiggetOrganizationInboxesRequestConfig(Integer page, Integer size, String sort)To obtain the request config of the operation getOrganizationInboxes final UnitsendEmail(UUID inboxId, SendEmailOptions sendEmailOptions)Send Email Send an email from an inbox's email address. final RequestConfigsendEmailRequestConfig(UUID inboxId, SendEmailOptions sendEmailOptions)To obtain the request config of the operation sendEmail final SentEmailDtosendEmailAndConfirm(UUID inboxId, SendEmailOptions sendEmailOptions)Send email and return sent confirmation Sister method for standard `sendEmail` method with the benefit of returning a `SentEmail` entity confirming the successful sending of the email with a link to the sent object created for it. final RequestConfigsendEmailAndConfirmRequestConfig(UUID inboxId, SendEmailOptions sendEmailOptions)To obtain the request config of the operation sendEmailAndConfirm final UnitsendTestEmail(UUID inboxId)Send a test email to inbox Send an inbox a test email to test email receiving is working final RequestConfigsendTestEmailRequestConfig(UUID inboxId)To obtain the request config of the operation sendTestEmail final InboxsetInboxFavourited(UUID inboxId, SetInboxFavouritedOptions setInboxFavouritedOptions)Set inbox favourited state Set and return new favourite state for an inbox final RequestConfigsetInboxFavouritedRequestConfig(UUID inboxId, SetInboxFavouritedOptions setInboxFavouritedOptions)To obtain the request config of the operation setInboxFavourited final InboxupdateInbox(UUID inboxId, UpdateInboxOptions updateInboxOptions)Update Inbox. final RequestConfigupdateInboxRequestConfig(UUID inboxId, UpdateInboxOptions updateInboxOptions)To obtain the request config of the operation updateInbox -
-
Method Detail
-
getBaseUrl
final String getBaseUrl()
-
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 `SMTP` or `HTTP` 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- Grant team access to this inbox and the emails that belong to it for team members of your organization.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- Grant team access to this inbox and the emails that belong to it for team members of your organization.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.
-
createInboxWithDefaults
final Inbox createInboxWithDefaults()
Create an inbox with default options. Uses MailSlurp domain pool address and is private.
-
createInboxWithDefaultsRequestConfig
final RequestConfig createInboxWithDefaultsRequestConfig()
To obtain the request config of the operation createInboxWithDefaults
-
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
-
createInboxWithOptionsRequestConfig
final RequestConfig createInboxWithOptionsRequestConfig(CreateInboxDto createInboxDto)
To obtain the request config of the operation createInboxWithOptions
- 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.
-
deleteAllInboxesRequestConfig
final RequestConfig deleteAllInboxesRequestConfig()
To obtain the request config of the operation deleteAllInboxes
-
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
-
deleteInboxRequestConfig
final RequestConfig deleteInboxRequestConfig(UUID inboxId)
To obtain the request config of the operation deleteInbox
- Parameters:
inboxId- inboxId
-
getAllInboxes
final PageInboxProjection getAllInboxes(Boolean favourite, Integer page, String search, Integer size, String sort, String tag, Boolean teamAccess)
List All Inboxes Paginated List inboxes in paginated form. The results are available on the `content` 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 `getInboxes` method returns a full list of inboxes but is limited to 100 results. Results do not include team access inboxes by default. Use organization method to list team inboxes or set `teamAccess` to true.
- Parameters:
favourite- Optionally filter results for favourites only (optional, default to false)page- Optional page index in inbox list pagination (optional, default to 0)search- Optionally filter by search words partial matching ID, tags, name, and email address (optional)size- Optional page size in inbox list pagination (optional, default to 20)sort- Optional createdAt sort direction ASC or DESC (optional, default to ASC)tag- Optionally filter by tags.teamAccess- Optionally filter by team access.
-
getAllInboxesRequestConfig
final RequestConfig getAllInboxesRequestConfig(Boolean favourite, Integer page, String search, Integer size, String sort, String tag, Boolean teamAccess)
To obtain the request config of the operation getAllInboxes
- Parameters:
favourite- Optionally filter results for favourites only (optional, default to false)page- Optional page index in inbox list pagination (optional, default to 0)search- Optionally filter by search words partial matching ID, tags, name, and email address (optional)size- Optional page size in inbox list pagination (optional, default to 20)sort- Optional createdAt sort direction ASC or DESC (optional, default to ASC)tag- Optionally filter by tags.teamAccess- Optionally filter by team access.
-
getEmails
final List<EmailPreview> getEmails(UUID inboxId, Integer limit, Long minCount, Long retryTimeout, OffsetDateTime since, Integer size, String sort)
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's email address will appear in the inbox. It may take several seconds for any email you send to an inbox's email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the `minCount` parameter. The server will retry the inbox database until the `minCount` is satisfied or the `retryTimeout` is reached
- Parameters:
inboxId- Id of inbox that emails belongs tolimit- 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)
-
getEmailsRequestConfig
final RequestConfig getEmailsRequestConfig(UUID inboxId, Integer limit, Long minCount, Long retryTimeout, OffsetDateTime since, Integer size, String sort)
To obtain the request config of the operation getEmails
- Parameters:
inboxId- Id of inbox that emails belongs tolimit- 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)
-
getInbox
final Inbox getInbox(UUID inboxId)
Get Inbox. Returns properties of an inbox. Returns an inbox's properties, including its email address and ID.
- Parameters:
inboxId- inboxId
-
getInboxRequestConfig
final RequestConfig getInboxRequestConfig(UUID inboxId)
To obtain the request config of the operation getInbox
- Parameters:
inboxId- inboxId
-
getInboxEmailsPaginated
final PageEmailPreview getInboxEmailsPaginated(UUID inboxId, Integer page, 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 topage- 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)
-
getInboxEmailsPaginatedRequestConfig
final RequestConfig getInboxEmailsPaginatedRequestConfig(UUID inboxId, Integer page, Integer size, String sort)
To obtain the request config of the operation getInboxEmailsPaginated
- Parameters:
inboxId- Id of inbox that emails belongs topage- 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)
-
getInboxSentEmails
final PageSentEmailProjection getInboxSentEmails(UUID inboxId, Integer page, Integer size, String sort)
Get Inbox Sent Emails Returns an inbox'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- inboxIdpage- 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)
-
getInboxSentEmailsRequestConfig
final RequestConfig getInboxSentEmailsRequestConfig(UUID inboxId, Integer page, Integer size, String sort)
To obtain the request config of the operation getInboxSentEmails
- Parameters:
inboxId- inboxIdpage- 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)
-
getInboxTags
final List<String> getInboxTags()
Get inbox tags Get all inbox tags
-
getInboxTagsRequestConfig
final RequestConfig getInboxTagsRequestConfig()
To obtain the request config of the operation getInboxTags
-
getInboxes
final List<Inbox> getInboxes(Integer size, String sort)
List Inboxes and email eddresses List the inboxes you have created. Note use of the more advanced `getAllEmails` is recommended. You can provide a limit and sort parameter.
- Parameters:
size- Optional result size limit.sort- Optional createdAt sort direction ASC or DESC (optional, default to ASC)
-
getInboxesRequestConfig
final RequestConfig getInboxesRequestConfig(Integer size, String sort)
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)
-
getOrganizationInboxes
final PageOrganizationInboxProjection getOrganizationInboxes(Integer page, Integer size, String sort)
List Organization Inboxes Paginated List organization inboxes in paginated form. These are inboxes created with `allowTeamAccess` flag enabled. Organization inboxes are `readOnly` for non-admin users. The results are available on the `content` 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 inbox list pagination (optional, default to 0)size- Optional page size in inbox list pagination (optional, default to 20)sort- Optional createdAt sort direction ASC or DESC (optional, default to ASC)
-
getOrganizationInboxesRequestConfig
final RequestConfig getOrganizationInboxesRequestConfig(Integer page, Integer size, String sort)
To obtain the request config of the operation getOrganizationInboxes
- Parameters:
page- Optional page index in inbox list pagination (optional, default to 0)size- Optional page size in inbox 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's email address. The request body should contain the `SendEmailOptions` that include recipients, attachments, body etc. See `SendEmailOptions` for all available properties. Note the `inboxId` refers to the inbox's id not the inbox'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 `sendEmailAndConfirm`.
- Parameters:
inboxId- ID of the inbox you want to send the email fromsendEmailOptions- 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 fromsendEmailOptions- Options for the email (optional)
-
sendEmailAndConfirm
final SentEmailDto sendEmailAndConfirm(UUID inboxId, SendEmailOptions sendEmailOptions)
Send email and return sent confirmation Sister method for standard `sendEmail` method with the benefit of returning a `SentEmail` 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 fromsendEmailOptions- 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 fromsendEmailOptions- 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
-
sendTestEmailRequestConfig
final RequestConfig sendTestEmailRequestConfig(UUID inboxId)
To obtain the request config of the operation sendTestEmail
- 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- inboxIdsetInboxFavouritedOptions- setInboxFavouritedOptions
-
setInboxFavouritedRequestConfig
final RequestConfig setInboxFavouritedRequestConfig(UUID inboxId, SetInboxFavouritedOptions setInboxFavouritedOptions)
To obtain the request config of the operation setInboxFavourited
- Parameters:
inboxId- inboxIdsetInboxFavouritedOptions- 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- inboxIdupdateInboxOptions- updateInboxOptions
-
updateInboxRequestConfig
final RequestConfig updateInboxRequestConfig(UUID inboxId, UpdateInboxOptions updateInboxOptions)
To obtain the request config of the operation updateInbox
- Parameters:
inboxId- inboxIdupdateInboxOptions- updateInboxOptions
-
-
-
-