All URIs are relative to https://api.mailslurp.com

MethodHTTP requestDescription
createAliasPOST /aliasesCreate 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.
deleteAliasDELETE /aliases/{aliasId}Delete an email alias
getAliasGET /aliases/{aliasId}Get an email alias
getAliasEmailsGET /aliases/{aliasId}/emailsGet emails for an alias
getAliasThreadsGET /aliases/{aliasId}/threadsGet threads created for an alias
getAliasesGET /aliasesGet all email aliases you have created
replyToAliasEmailPUT /aliases/{aliasId}/emails/{emailId}Reply to an email
sendAliasEmailPOST /aliases/{aliasId}/emailsSend an email from an alias inbox
updateAliasPUT /aliases/{aliasId}Update an email alias

AliasDto createAlias(createAliasOptions)

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.

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

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = AliasControllerApi()
val createAliasOptions : CreateAliasOptions =  // CreateAliasOptions | 
try {
    val result : AliasDto = apiInstance.createAlias(createAliasOptions)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AliasControllerApi#createAlias")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AliasControllerApi#createAlias")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
createAliasOptionsCreateAliasOptions

Return type

AliasDto

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

  • Content-Type: application/json
  • Accept: /

deleteAlias(aliasId)

Delete an email alias

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = AliasControllerApi()
val aliasId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | 
try {
    apiInstance.deleteAlias(aliasId)
} catch (e: ClientException) {
    println("4xx response calling AliasControllerApi#deleteAlias")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AliasControllerApi#deleteAlias")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
aliasIdjava.util.UUID

Return type

null (empty response body)

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

AliasDto getAlias(aliasId)

Get an email alias

Get an email alias by ID

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = AliasControllerApi()
val aliasId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | 
try {
    val result : AliasDto = apiInstance.getAlias(aliasId)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AliasControllerApi#getAlias")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AliasControllerApi#getAlias")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
aliasIdjava.util.UUID

Return type

AliasDto

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

PageEmailProjection getAliasEmails(aliasId, page, size, sort, since, before)

Get emails for an alias

Get paginated emails for an alias by ID

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = AliasControllerApi()
val aliasId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | 
val page : kotlin.Int = 56 // kotlin.Int | Optional page  alias email list pagination
val size : kotlin.Int = 56 // kotlin.Int | Optional page size alias email list pagination
val sort : kotlin.String = sort_example // kotlin.String | Optional createdAt sort direction ASC or DESC
val since : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | Optional filter by sent after given date time
val before : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | Optional filter by sent before given date time
try {
    val result : PageEmailProjection = apiInstance.getAliasEmails(aliasId, page, size, sort, since, before)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AliasControllerApi#getAliasEmails")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AliasControllerApi#getAliasEmails")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
aliasIdjava.util.UUID
pagekotlin.IntOptional page alias email list pagination[optional] [default to 0]
sizekotlin.IntOptional page size alias email list pagination[optional] [default to 20]
sortkotlin.StringOptional createdAt sort direction ASC or DESC[optional] [default to ASC] [enum: ASC, DESC]
sincejava.time.OffsetDateTimeOptional filter by sent after given date time[optional]
beforejava.time.OffsetDateTimeOptional filter by sent before given date time[optional]

Return type

PageEmailProjection

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

PageThreadProjection getAliasThreads(aliasId, page, size, sort, since, before)

Get threads created for an alias

Returns threads created for an email alias in paginated form

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = AliasControllerApi()
val aliasId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | 
val page : kotlin.Int = 56 // kotlin.Int | Optional page  in thread list pagination
val size : kotlin.Int = 56 // kotlin.Int | Optional page size in thread list pagination
val sort : kotlin.String = sort_example // kotlin.String | Optional createdAt sort direction ASC or DESC
val since : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | Optional filter by sent after given date time
val before : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | Optional filter by sent before given date time
try {
    val result : PageThreadProjection = apiInstance.getAliasThreads(aliasId, page, size, sort, since, before)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AliasControllerApi#getAliasThreads")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AliasControllerApi#getAliasThreads")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
aliasIdjava.util.UUID
pagekotlin.IntOptional page in thread list pagination[optional] [default to 0]
sizekotlin.IntOptional page size in thread list pagination[optional] [default to 20]
sortkotlin.StringOptional createdAt sort direction ASC or DESC[optional] [default to ASC] [enum: ASC, DESC]
sincejava.time.OffsetDateTimeOptional filter by sent after given date time[optional]
beforejava.time.OffsetDateTimeOptional filter by sent before given date time[optional]

Return type

PageThreadProjection

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

PageAlias getAliases(page, size, sort, since, before)

Get all email aliases you have created

Get all email aliases in paginated form

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = AliasControllerApi()
val page : kotlin.Int = 56 // kotlin.Int | Optional page  in alias list pagination
val size : kotlin.Int = 56 // kotlin.Int | Optional page size in alias list pagination
val sort : kotlin.String = sort_example // kotlin.String | Optional createdAt sort direction ASC or DESC
val since : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | Filter by created at after the given timestamp
val before : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | Filter by created at before the given timestamp
try {
    val result : PageAlias = apiInstance.getAliases(page, size, sort, since, before)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AliasControllerApi#getAliases")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AliasControllerApi#getAliases")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
pagekotlin.IntOptional page in alias list pagination[optional] [default to 0]
sizekotlin.IntOptional page size in alias list pagination[optional] [default to 20]
sortkotlin.StringOptional createdAt sort direction ASC or DESC[optional] [default to ASC] [enum: ASC, DESC]
sincejava.time.OffsetDateTimeFilter by created at after the given timestamp[optional]
beforejava.time.OffsetDateTimeFilter by created at before the given timestamp[optional]

Return type

PageAlias

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

SentEmailDto replyToAliasEmail(aliasId, emailId, replyToAliasEmailOptions)

Reply to an email

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.

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = AliasControllerApi()
val aliasId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | ID of the alias that email belongs to
val emailId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | ID of the email that should be replied to
val replyToAliasEmailOptions : ReplyToAliasEmailOptions =  // ReplyToAliasEmailOptions | 
try {
    val result : SentEmailDto = apiInstance.replyToAliasEmail(aliasId, emailId, replyToAliasEmailOptions)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AliasControllerApi#replyToAliasEmail")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AliasControllerApi#replyToAliasEmail")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
aliasIdjava.util.UUIDID of the alias that email belongs to
emailIdjava.util.UUIDID of the email that should be replied to
replyToAliasEmailOptionsReplyToAliasEmailOptions

Return type

SentEmailDto

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

  • Content-Type: application/json
  • Accept: /

SentEmailDto sendAliasEmail(aliasId, sendEmailOptions)

Send an email from an alias inbox

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

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = AliasControllerApi()
val aliasId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | 
val sendEmailOptions : SendEmailOptions =  // SendEmailOptions | 
try {
    val result : SentEmailDto = apiInstance.sendAliasEmail(aliasId, sendEmailOptions)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AliasControllerApi#sendAliasEmail")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AliasControllerApi#sendAliasEmail")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
aliasIdjava.util.UUID
sendEmailOptionsSendEmailOptions

Return type

SentEmailDto

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

  • Content-Type: application/json
  • Accept: /

AliasDto updateAlias(aliasId, updateAliasOptions)

Update an email alias

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = AliasControllerApi()
val aliasId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | 
val updateAliasOptions : UpdateAliasOptions =  // UpdateAliasOptions | 
try {
    val result : AliasDto = apiInstance.updateAlias(aliasId, updateAliasOptions)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AliasControllerApi#updateAlias")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AliasControllerApi#updateAlias")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
aliasIdjava.util.UUID
updateAliasOptionsUpdateAliasOptions

Return type

AliasDto

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

  • Content-Type: application/json
  • Accept: /