MailSlurp JS

Globals / AliasControllerApi

Class: AliasControllerApi

AliasControllerApi - object-oriented interface

export

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

Inherited from BaseAPI.constructor

Defined in src/generated/api.ts:57

Parameters:

NameTypeDefault value
configuration?Configuration-
basePathstringBASE_PATH
fetchFetchAPIportableFetch

Returns: AliasControllerApi

Properties

basePath

Protected basePath: string

Inherited from BaseAPI.basePath

Defined in src/generated/api.ts:61


configuration

Protected configuration: Configuration

Inherited from BaseAPI.configuration

Defined in src/generated/api.ts:57


fetch

Protected fetch: FetchAPI

Inherited from BaseAPI.fetch

Defined in src/generated/api.ts:62

Methods

createAlias

createAlias(createAliasOptions: CreateAliasOptions, options?: any): Promise<AliasDto>

Defined in src/generated/api.ts:6672

Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached

summary Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active.

throws {RequiredError}

memberof AliasControllerApi

Parameters:

NameTypeDescription
createAliasOptionsCreateAliasOptionscreateAliasOptions
options?any-

Returns: Promise<AliasDto>


deleteAlias

deleteAlias(aliasId: string, options?: any): Promise

Defined in src/generated/api.ts:6687

summary Delete an email alias

throws {RequiredError}

memberof AliasControllerApi

Parameters:

NameTypeDescription
aliasIdstringaliasId
options?any-

Returns: Promise


getAlias

getAlias(aliasId: string, options?: any): Promise<AliasDto>

Defined in src/generated/api.ts:6702

Get an email alias by ID

summary Get an email alias

throws {RequiredError}

memberof AliasControllerApi

Parameters:

NameTypeDescription
aliasIdstringaliasId
options?any-

Returns: Promise<AliasDto>


getAliasEmails

getAliasEmails(aliasId: string, page?: number, size?: number, sort?: “ASC” | “DESC”, options?: any): Promise<PageEmailProjection>

Defined in src/generated/api.ts:6720

Get paginated emails for an alias by ID

summary Get emails for an alias

throws {RequiredError}

memberof AliasControllerApi

Parameters:

NameTypeDescription
aliasIdstringaliasId
page?number-
size?number-
sort?“ASC”“DESC”
options?any-

Returns: Promise<PageEmailProjection>


getAliasThreads

getAliasThreads(aliasId: string, page?: number, size?: number, sort?: “ASC” | “DESC”, options?: any): Promise<PageThreadProjection>

Defined in src/generated/api.ts:6747

Returns threads created for an email alias in paginated form

summary Get threads created for an alias

throws {RequiredError}

memberof AliasControllerApi

Parameters:

NameTypeDescription
aliasIdstringaliasId
page?number-
size?number-
sort?“ASC”“DESC”
options?any-

Returns: Promise<PageThreadProjection>


getAliases

getAliases(page?: number, size?: number, sort?: “ASC” | “DESC”, options?: any): Promise<PageAlias>

Defined in src/generated/api.ts:6773

Get all email aliases in paginated form

summary Get all email aliases you have created

throws {RequiredError}

memberof AliasControllerApi

Parameters:

NameType
page?number
size?number
sort?“ASC”
options?any

Returns: Promise<PageAlias>


replyToAliasEmail

replyToAliasEmail(aliasId: string, emailId: string, replyToAliasEmailOptions: ReplyToAliasEmailOptions, options?: any): Promise<SentEmailDto>

Defined in src/generated/api.ts:6797

Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails to, cc, and bcc.

summary Reply to an email

throws {RequiredError}

memberof AliasControllerApi

Parameters:

NameTypeDescription
aliasIdstringID of the alias that email belongs to
emailIdstringID of the email that should be replied to
replyToAliasEmailOptionsReplyToAliasEmailOptionsreplyToAliasEmailOptions
options?any-

Returns: Promise<SentEmailDto>


sendAliasEmail

sendAliasEmail(aliasId: string, sendEmailOptions?: SendEmailOptions, options?: any): Promise<SentEmailDto>

Defined in src/generated/api.ts:6820

Send an email from an alias. Replies to the email will be forwarded to the alias masked email address

summary Send an email from an alias inbox

throws {RequiredError}

memberof AliasControllerApi

Parameters:

NameTypeDescription
aliasIdstringaliasId
sendEmailOptions?SendEmailOptions-
options?any-

Returns: Promise<SentEmailDto>


updateAlias

updateAlias(aliasId: string, updateAliasOptions: UpdateAliasOptions, options?: any): Promise

Defined in src/generated/api.ts:6841

summary Update an email alias

throws {RequiredError}

memberof AliasControllerApi

Parameters:

NameTypeDescription
aliasIdstringaliasId
updateAliasOptionsUpdateAliasOptionsupdateAliasOptions
options?any-

Returns: Promise