# Class: InboxControllerApi

InboxControllerApi - object-oriented interface

export

class InboxControllerApi

extends {BaseAPI}

# Hierarchy

# Constructors

# constructor

+ new InboxControllerApi(configuration?: Configuration, basePath: string, fetch: FetchAPI): InboxControllerApi

Inherited from BaseAPI.constructor

Defined in src/generated/api.ts:57

Parameters:

Name Type Default
configuration? Configuration -
basePath string BASE_PATH
fetch FetchAPI portableFetch

Returns: InboxControllerApi

# Properties

# Protected basePath

basePath: string

Inherited from BaseAPI.basePath

Defined in src/generated/api.ts:61


# Protected configuration

configuration: Configuration

Inherited from BaseAPI.configuration

Defined in src/generated/api.ts:57


# Protected fetch

fetch: FetchAPI

Inherited from BaseAPI.fetch

Defined in src/generated/api.ts:62

# Methods

# createInbox

createInbox(description?: string, emailAddress?: string, expiresAt?: Date, favourite?: boolean, name?: string, tags?: Array‹string›, options?: any): Promise‹Inbox

Defined in src/generated/api.ts:10303

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.

summary Create an Inbox (email address)

throws {RequiredError}

memberof InboxControllerApi

Parameters:

Name Type
description? string
emailAddress? string
expiresAt? Date
favourite? boolean
name? string
tags? Array‹string›
options? any

Returns: Promise‹Inbox


# deleteAllInboxes

deleteAllInboxes(options?: any): Promise‹Response›

Defined in src/generated/api.ts:10330

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.

summary Delete all inboxes

throws {RequiredError}

memberof InboxControllerApi

Parameters:

Name Type
options? any

Returns: Promise‹Response›


# deleteInbox

deleteInbox(inboxId: string, options?: any): Promise‹Response›

Defined in src/generated/api.ts:10344

Permanently delete an inbox and associated email address aswell 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.

summary Delete inbox

throws {RequiredError}

memberof InboxControllerApi

Parameters:

Name Type Description
inboxId string inboxId
options? any -

Returns: Promise‹Response›


# getAllInboxes

getAllInboxes(favourite?: boolean, page?: number, search?: string, size?: number, sort?: "ASC" | "DESC", tag?: string, options?: any): Promise‹PageInboxProjection

Defined in src/generated/api.ts:10364

List inboxes in paginated form. Allows for page index, page size, and sort direction. Can also filter by favourited or email address like pattern.

summary List Inboxes Paginated

throws {RequiredError}

memberof InboxControllerApi

Parameters:

Name Type
favourite? boolean
page? number
search? string
size? number
sort? "ASC" | "DESC"
tag? string
options? any

Returns: Promise‹PageInboxProjection


# getEmails

getEmails(inboxId: string, limit?: number, minCount?: number, retryTimeout?: number, since?: Date, sort?: "ASC" | "DESC", options?: any): Promise‹EmailPreview[]›

Defined in src/generated/api.ts:10397

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

summary Get emails in an Inbox

throws {RequiredError}

memberof InboxControllerApi

Parameters:

Name Type Description
inboxId string Id of inbox that emails belongs to
limit? number -
minCount? number -
retryTimeout? number -
since? Date -
sort? "ASC" | "DESC" -
options? any -

Returns: Promise‹EmailPreview[]›


# getInbox

getInbox(inboxId: string, options?: any): Promise‹Inbox

Defined in src/generated/api.ts:10425

Returns an inbox's properties, including its email address and ID.

summary Get Inbox

throws {RequiredError}

memberof InboxControllerApi

Parameters:

Name Type Description
inboxId string inboxId
options? any -

Returns: Promise‹Inbox


# getInboxEmailsPaginated

getInboxEmailsPaginated(inboxId: string, page?: number, size?: number, sort?: "ASC" | "DESC", options?: any): Promise‹PageEmailPreview

Defined in src/generated/api.ts:10443

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

summary Get inbox emails paginated

throws {RequiredError}

memberof InboxControllerApi

Parameters:

Name Type Description
inboxId string Id of inbox that emails belongs to
page? number -
size? number -
sort? "ASC" | "DESC" -
options? any -

Returns: Promise‹PageEmailPreview


# getInboxTags

getInboxTags(options?: any): Promise‹string[]›

Defined in src/generated/api.ts:10466

Get all inbox tags

summary Get inbox tags

throws {RequiredError}

memberof InboxControllerApi

Parameters:

Name Type
options? any

Returns: Promise‹string[]›


# getInboxes

getInboxes(options?: any): Promise‹Inbox[]›

Defined in src/generated/api.ts:10480

List the inboxes you have created

summary List Inboxes / Email Addresses

throws {RequiredError}

memberof InboxControllerApi

Parameters:

Name Type
options? any

Returns: Promise‹Inbox[]›


# sendEmail

sendEmail(inboxId: string, sendEmailOptions?: SendEmailOptions, options?: any): Promise‹Response›

Defined in src/generated/api.ts:10496

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.

summary Send Email

throws {RequiredError}

memberof InboxControllerApi

Parameters:

Name Type Description
inboxId string ID of the inbox you want to send the email from
sendEmailOptions? SendEmailOptions -
options? any -

Returns: Promise‹Response›


# setInboxFavourited

setInboxFavourited(inboxId: string, setInboxFavouritedOptions: SetInboxFavouritedOptions, options?: any): Promise‹Inbox

Defined in src/generated/api.ts:10517

Set and return new favourite state for an inbox

summary Set inbox favourited state

throws {RequiredError}

memberof InboxControllerApi

Parameters:

Name Type Description
inboxId string inboxId
setInboxFavouritedOptions SetInboxFavouritedOptions setInboxFavouritedOptions
options? any -

Returns: Promise‹Inbox


# updateInbox

updateInbox(inboxId: string, updateInboxOptions: UpdateInboxOptions, options?: any): Promise‹Inbox

Defined in src/generated/api.ts:10538

Update editable fields on an inbox

summary Update Inbox

throws {RequiredError}

memberof InboxControllerApi

Parameters:

Name Type Description
inboxId string inboxId
updateInboxOptions UpdateInboxOptions updateInboxOptions
options? any -

Returns: Promise‹Inbox