Class: InboxControllerApi

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new InboxControllerApi(configuration?)

Parameters

NameType
configurationConfiguration

Inherited from

BaseAPI.constructor

Properties

configuration

Protected configuration: Configuration

Inherited from

BaseAPI.configuration

Methods

createInbox

createInbox(requestParameters, initOverrides?): Promise<Inbox>

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

Parameters

NameType
requestParametersCreateInboxRequest
initOverrides?RequestInit

Returns

Promise<Inbox>


createInboxRaw

createInboxRaw(requestParameters, initOverrides?): Promise<ApiResponse<Inbox»

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

Parameters

NameType
requestParametersCreateInboxRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<Inbox»


createInboxRuleset

createInboxRuleset(requestParameters, initOverrides?): Promise<InboxRulesetDto>

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

Parameters

NameType
requestParametersCreateInboxRulesetRequest
initOverrides?RequestInit

Returns

Promise<InboxRulesetDto>


createInboxRulesetRaw

createInboxRulesetRaw(requestParameters, initOverrides?): Promise<ApiResponse<InboxRulesetDto»

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

Parameters

NameType
requestParametersCreateInboxRulesetRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<InboxRulesetDto»


createInboxWithDefaults

createInboxWithDefaults(initOverrides?): Promise<Inbox>

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

Parameters

NameType
initOverrides?RequestInit

Returns

Promise<Inbox>


createInboxWithDefaultsRaw

createInboxWithDefaultsRaw(initOverrides?): Promise<ApiResponse<Inbox»

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

Parameters

NameType
initOverrides?RequestInit

Returns

Promise<ApiResponse<Inbox»


createInboxWithOptions

createInboxWithOptions(requestParameters, initOverrides?): Promise<Inbox>

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

Parameters

NameType
requestParametersCreateInboxWithOptionsRequest
initOverrides?RequestInit

Returns

Promise<Inbox>


createInboxWithOptionsRaw

createInboxWithOptionsRaw(requestParameters, initOverrides?): Promise<ApiResponse<Inbox»

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

Parameters

NameType
requestParametersCreateInboxWithOptionsRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<Inbox»


deleteAllInboxes

deleteAllInboxes(initOverrides?): Promise<void>

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. Delete all inboxes

Parameters

NameType
initOverrides?RequestInit

Returns

Promise<void>


deleteAllInboxesRaw

deleteAllInboxesRaw(initOverrides?): Promise<ApiResponse<void»

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. Delete all inboxes

Parameters

NameType
initOverrides?RequestInit

Returns

Promise<ApiResponse<void»


deleteInbox

deleteInbox(requestParameters, initOverrides?): Promise<void>

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. Delete inbox

Parameters

NameType
requestParametersDeleteInboxRequest
initOverrides?RequestInit

Returns

Promise<void>


deleteInboxRaw

deleteInboxRaw(requestParameters, initOverrides?): Promise<ApiResponse<void»

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. Delete inbox

Parameters

NameType
requestParametersDeleteInboxRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<void»


doesInboxExist

doesInboxExist(requestParameters, initOverrides?): Promise<InboxExistsDto>

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

Parameters

NameType
requestParametersDoesInboxExistRequest
initOverrides?RequestInit

Returns

Promise<InboxExistsDto>


doesInboxExistRaw

doesInboxExistRaw(requestParameters, initOverrides?): Promise<ApiResponse<InboxExistsDto»

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

Parameters

NameType
requestParametersDoesInboxExistRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<InboxExistsDto»


flushExpired

flushExpired(requestParameters, initOverrides?): Promise<FlushExpiredInboxesResult>

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

Parameters

NameType
requestParametersFlushExpiredRequest
initOverrides?RequestInit

Returns

Promise<FlushExpiredInboxesResult>


flushExpiredRaw

flushExpiredRaw(requestParameters, initOverrides?): Promise<ApiResponse<FlushExpiredInboxesResult»

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

Parameters

NameType
requestParametersFlushExpiredRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<FlushExpiredInboxesResult»


getAllInboxes

getAllInboxes(requestParameters, initOverrides?): Promise<PageInboxProjection>

List inboxes in paginated form. The results are available on the content property of the returned object. This method allows for page (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. List All Inboxes Paginated

Parameters

NameType
requestParametersGetAllInboxesRequest
initOverrides?RequestInit

Returns

Promise<PageInboxProjection>


getAllInboxesRaw

getAllInboxesRaw(requestParameters, initOverrides?): Promise<ApiResponse<PageInboxProjection»

List inboxes in paginated form. The results are available on the content property of the returned object. This method allows for page (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. List All Inboxes Paginated

Parameters

NameType
requestParametersGetAllInboxesRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<PageInboxProjection»


getEmails

getEmails(requestParameters, initOverrides?): Promise<EmailPreview[]>

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

Parameters

NameType
requestParametersGetEmailsRequest
initOverrides?RequestInit

Returns

Promise<EmailPreview[]>


getEmailsRaw

getEmailsRaw(requestParameters, initOverrides?): Promise<ApiResponse<EmailPreview[]»

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

Parameters

NameType
requestParametersGetEmailsRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<EmailPreview[]»


getInbox

getInbox(requestParameters, initOverrides?): Promise<Inbox>

Returns an inbox’s properties, including its email address and ID. Get Inbox. Returns properties of an inbox.

Parameters

NameType
requestParametersGetInboxRequest
initOverrides?RequestInit

Returns

Promise<Inbox>


getInboxEmailsPaginated

getInboxEmailsPaginated(requestParameters, initOverrides?): Promise<PageEmailPreview>

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

Parameters

NameType
requestParametersGetInboxEmailsPaginatedRequest
initOverrides?RequestInit

Returns

Promise<PageEmailPreview>


getInboxEmailsPaginatedRaw

getInboxEmailsPaginatedRaw(requestParameters, initOverrides?): Promise<ApiResponse<PageEmailPreview»

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

Parameters

NameType
requestParametersGetInboxEmailsPaginatedRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<PageEmailPreview»


getInboxRaw

getInboxRaw(requestParameters, initOverrides?): Promise<ApiResponse<Inbox»

Returns an inbox’s properties, including its email address and ID. Get Inbox. Returns properties of an inbox.

Parameters

NameType
requestParametersGetInboxRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<Inbox»


getInboxSentEmails

getInboxSentEmails(requestParameters, initOverrides?): Promise<PageSentEmailProjection>

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. Get Inbox Sent Emails

Parameters

NameType
requestParametersGetInboxSentEmailsRequest
initOverrides?RequestInit

Returns

Promise<PageSentEmailProjection>


getInboxSentEmailsRaw

getInboxSentEmailsRaw(requestParameters, initOverrides?): Promise<ApiResponse<PageSentEmailProjection»

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. Get Inbox Sent Emails

Parameters

NameType
requestParametersGetInboxSentEmailsRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<PageSentEmailProjection»


getInboxTags

getInboxTags(initOverrides?): Promise<string[]>

Get all inbox tags Get inbox tags

Parameters

NameType
initOverrides?RequestInit

Returns

Promise<string[]>


getInboxTagsRaw

getInboxTagsRaw(initOverrides?): Promise<ApiResponse<string[]»

Get all inbox tags Get inbox tags

Parameters

NameType
initOverrides?RequestInit

Returns

Promise<ApiResponse<string[]»


getInboxes

getInboxes(requestParameters, initOverrides?): Promise<Inbox[]>

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

Parameters

NameType
requestParametersGetInboxesRequest
initOverrides?RequestInit

Returns

Promise<Inbox[]>


getInboxesRaw

getInboxesRaw(requestParameters, initOverrides?): Promise<ApiResponse<Inbox[]»

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

Parameters

NameType
requestParametersGetInboxesRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<Inbox[]»


getOrganizationInboxes

getOrganizationInboxes(requestParameters, initOverrides?): Promise<PageOrganizationInboxProjection>

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 (zero based), page size (how many results to return), and a sort direction (based on createdAt time). List Organization Inboxes Paginated

Parameters

NameType
requestParametersGetOrganizationInboxesRequest
initOverrides?RequestInit

Returns

Promise<PageOrganizationInboxProjection>


getOrganizationInboxesRaw

getOrganizationInboxesRaw(requestParameters, initOverrides?): Promise<ApiResponse<PageOrganizationInboxProjection»

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 (zero based), page size (how many results to return), and a sort direction (based on createdAt time). List Organization Inboxes Paginated

Parameters

NameType
requestParametersGetOrganizationInboxesRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<PageOrganizationInboxProjection»


listInboxRulesets

listInboxRulesets(requestParameters, initOverrides?): Promise<PageInboxRulesetDto>

List all rulesets attached to an inbox List inbox rulesets

Parameters

NameType
requestParametersListInboxRulesetsRequest
initOverrides?RequestInit

Returns

Promise<PageInboxRulesetDto>


listInboxRulesetsRaw

listInboxRulesetsRaw(requestParameters, initOverrides?): Promise<ApiResponse<PageInboxRulesetDto»

List all rulesets attached to an inbox List inbox rulesets

Parameters

NameType
requestParametersListInboxRulesetsRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<PageInboxRulesetDto»


listInboxTrackingPixels

listInboxTrackingPixels(requestParameters, initOverrides?): Promise<PageTrackingPixelProjection>

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

Parameters

NameType
requestParametersListInboxTrackingPixelsRequest
initOverrides?RequestInit

Returns

Promise<PageTrackingPixelProjection>


listInboxTrackingPixelsRaw

listInboxTrackingPixelsRaw(requestParameters, initOverrides?): Promise<ApiResponse<PageTrackingPixelProjection»

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

Parameters

NameType
requestParametersListInboxTrackingPixelsRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<PageTrackingPixelProjection»


request

Protected request(context, initOverrides?): Promise<Response>

Parameters

NameType
contextRequestOpts
initOverrides?RequestInit

Returns

Promise<Response>

Inherited from

BaseAPI.request


sendEmail

sendEmail(requestParameters, initOverrides?): Promise<void>

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. Send Email

Parameters

NameType
requestParametersSendEmailRequest
initOverrides?RequestInit

Returns

Promise<void>


sendEmailAndConfirm

sendEmailAndConfirm(requestParameters, initOverrides?): Promise<SentEmailDto>

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. Send email and return sent confirmation

Parameters

NameType
requestParametersSendEmailAndConfirmRequest
initOverrides?RequestInit

Returns

Promise<SentEmailDto>


sendEmailAndConfirmRaw

sendEmailAndConfirmRaw(requestParameters, initOverrides?): Promise<ApiResponse<SentEmailDto»

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. Send email and return sent confirmation

Parameters

NameType
requestParametersSendEmailAndConfirmRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<SentEmailDto»


sendEmailRaw

sendEmailRaw(requestParameters, initOverrides?): Promise<ApiResponse<void»

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. Send Email

Parameters

NameType
requestParametersSendEmailRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<void»


sendTestEmail

sendTestEmail(requestParameters, initOverrides?): Promise<void>

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

Parameters

NameType
requestParametersSendTestEmailRequest
initOverrides?RequestInit

Returns

Promise<void>


sendTestEmailRaw

sendTestEmailRaw(requestParameters, initOverrides?): Promise<ApiResponse<void»

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

Parameters

NameType
requestParametersSendTestEmailRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<void»


setInboxFavourited

setInboxFavourited(requestParameters, initOverrides?): Promise<Inbox>

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

Parameters

NameType
requestParametersSetInboxFavouritedRequest
initOverrides?RequestInit

Returns

Promise<Inbox>


setInboxFavouritedRaw

setInboxFavouritedRaw(requestParameters, initOverrides?): Promise<ApiResponse<Inbox»

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

Parameters

NameType
requestParametersSetInboxFavouritedRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<Inbox»


updateInbox

updateInbox(requestParameters, initOverrides?): Promise<Inbox>

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

Parameters

NameType
requestParametersUpdateInboxRequest
initOverrides?RequestInit

Returns

Promise<Inbox>


updateInboxRaw

updateInboxRaw(requestParameters, initOverrides?): Promise<ApiResponse<Inbox»

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

Parameters

NameType
requestParametersUpdateInboxRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<Inbox»


withMiddleware

withMiddleware<T>(…middlewares): T

Type parameters

NameType
Textends BaseAPI<T>

Parameters

NameType
...middlewaresMiddleware[]

Returns

T

Inherited from

BaseAPI.withMiddleware


withPostMiddleware

withPostMiddleware<T>(…postMiddlewares): T

Type parameters

NameType
Textends BaseAPI<T>

Parameters

NameType
...postMiddlewares(context: ResponseContext) => Promise<void

Returns

T

Inherited from

BaseAPI.withPostMiddleware


withPreMiddleware

withPreMiddleware<T>(…preMiddlewares): T

Type parameters

NameType
Textends BaseAPI<T>

Parameters

NameType
...preMiddlewares(context: RequestContext) => Promise<void

Returns

T

Inherited from

BaseAPI.withPreMiddleware