AliasControllerApi
All URIs are relative to https://api.mailslurp.com
Method | HTTP request | Description |
---|---|---|
createAlias | POST /aliases | 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. |
deleteAlias | DELETE /aliases/{aliasId} | Delete an email alias |
getAlias | GET /aliases/{aliasId} | Get an email alias |
getAliasEmails | GET /aliases/{aliasId}/emails | Get emails for an alias |
getAliasThreads | GET /aliases/{aliasId}/threads | Get threads created for an alias |
getAliases | GET /aliases | Get all email aliases you have created |
replyToAliasEmail | PUT /aliases/{aliasId}/emails/{emailId} | Reply to an email |
sendAliasEmail | POST /aliases/{aliasId}/emails | Send an email from an alias inbox |
updateAlias | PUT /aliases/{aliasId} | Update an email alias |
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.*
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*
val apiClient = ApiClient()
val webService = apiClient.createWebservice(AliasControllerApi::class.java)
val createAliasOptions : CreateAliasOptions = // CreateAliasOptions |
val result : AliasDto = webService.createAlias(createAliasOptions)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
createAliasOptions | CreateAliasOptions |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
Delete an email alias
Example
// Import classes:
//import com.mailslurp.*
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*
val apiClient = ApiClient()
val webService = apiClient.createWebservice(AliasControllerApi::class.java)
val aliasId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
webService.deleteAlias(aliasId)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
aliasId | java.util.UUID |
Return type
null (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
Get an email alias
Get an email alias by ID
Example
// Import classes:
//import com.mailslurp.*
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*
val apiClient = ApiClient()
val webService = apiClient.createWebservice(AliasControllerApi::class.java)
val aliasId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
val result : AliasDto = webService.getAlias(aliasId)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
aliasId | java.util.UUID |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
Get emails for an alias
Get paginated emails for an alias by ID
Example
// Import classes:
//import com.mailslurp.*
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*
val apiClient = ApiClient()
val webService = apiClient.createWebservice(AliasControllerApi::class.java)
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
val result : PageEmailProjection = webService.getAliasEmails(aliasId, page, size, sort, since, before)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
aliasId | java.util.UUID | ||
page | kotlin.Int | Optional page alias email list pagination | [optional] [default to 0] |
size | kotlin.Int | Optional page size alias email list pagination | [optional] [default to 20] |
sort | kotlin.String | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] [enum: ASC, DESC] |
since | java.time.OffsetDateTime | Optional filter by sent after given date time | [optional] |
before | java.time.OffsetDateTime | Optional filter by sent before given date time | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
Get threads created for an alias
Returns threads created for an email alias in paginated form
Example
// Import classes:
//import com.mailslurp.*
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*
val apiClient = ApiClient()
val webService = apiClient.createWebservice(AliasControllerApi::class.java)
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
val result : PageThreadProjection = webService.getAliasThreads(aliasId, page, size, sort, since, before)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
aliasId | java.util.UUID | ||
page | kotlin.Int | Optional page in thread list pagination | [optional] [default to 0] |
size | kotlin.Int | Optional page size in thread list pagination | [optional] [default to 20] |
sort | kotlin.String | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] [enum: ASC, DESC] |
since | java.time.OffsetDateTime | Optional filter by sent after given date time | [optional] |
before | java.time.OffsetDateTime | Optional filter by sent before given date time | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
Get all email aliases you have created
Get all email aliases in paginated form
Example
// Import classes:
//import com.mailslurp.*
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*
val apiClient = ApiClient()
val webService = apiClient.createWebservice(AliasControllerApi::class.java)
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
val result : PageAlias = webService.getAliases(page, size, sort, since, before)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
page | kotlin.Int | Optional page in alias list pagination | [optional] [default to 0] |
size | kotlin.Int | Optional page size in alias list pagination | [optional] [default to 20] |
sort | kotlin.String | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] [enum: ASC, DESC] |
since | java.time.OffsetDateTime | Filter by created at after the given timestamp | [optional] |
before | java.time.OffsetDateTime | Filter by created at before the given timestamp | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
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.*
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*
val apiClient = ApiClient()
val webService = apiClient.createWebservice(AliasControllerApi::class.java)
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 |
val result : SentEmailDto = webService.replyToAliasEmail(aliasId, emailId, replyToAliasEmailOptions)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
aliasId | java.util.UUID | ID of the alias that email belongs to | |
emailId | java.util.UUID | ID of the email that should be replied to | |
replyToAliasEmailOptions | ReplyToAliasEmailOptions |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
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.*
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*
val apiClient = ApiClient()
val webService = apiClient.createWebservice(AliasControllerApi::class.java)
val aliasId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
val sendEmailOptions : SendEmailOptions = // SendEmailOptions |
val result : SentEmailDto = webService.sendAliasEmail(aliasId, sendEmailOptions)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
aliasId | java.util.UUID | ||
sendEmailOptions | SendEmailOptions |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
Update an email alias
Example
// Import classes:
//import com.mailslurp.*
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*
val apiClient = ApiClient()
val webService = apiClient.createWebservice(AliasControllerApi::class.java)
val aliasId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
val updateAliasOptions : UpdateAliasOptions = // UpdateAliasOptions |
val result : AliasDto = webService.updateAlias(aliasId, updateAliasOptions)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
aliasId | java.util.UUID | ||
updateAliasOptions | UpdateAliasOptions |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /