Skip to content

MailSlurp\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

CreateAlias

AliasDto CreateAlias(ctx, 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

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
createAliasOptions CreateAliasOptions

Return type

AliasDto

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]

DeleteAlias

DeleteAlias(ctx, aliasId)

Delete an email alias

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
aliasId string

Return type

(empty response body)

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetAlias

AliasDto GetAlias(ctx, aliasId)

Get an email alias

Get an email alias by ID

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
aliasId string

Return type

AliasDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetAliasEmails

PageEmailProjection GetAliasEmails(ctx, aliasId, optional)

Get emails for an alias

Get paginated emails for an alias by ID

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
aliasId string
optional *GetAliasEmailsOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetAliasEmailsOpts struct

Name Type Description Notes

page | optional.Int32| Optional page alias email list pagination | [default to 0] size | optional.Int32| Optional page size alias email list pagination | [default to 20] sort | optional.String| Optional createdAt sort direction ASC or DESC | [default to ASC] since | optional.Time| Optional filter by sent after given date time | before | optional.Time| Optional filter by sent before given date time |

Return type

PageEmailProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetAliasThreads

PageThreadProjection GetAliasThreads(ctx, aliasId, optional)

Get threads created for an alias

Returns threads created for an email alias in paginated form

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
aliasId string
optional *GetAliasThreadsOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetAliasThreadsOpts struct

Name Type Description Notes

page | optional.Int32| Optional page in thread list pagination | [default to 0] size | optional.Int32| Optional page size in thread list pagination | [default to 20] sort | optional.String| Optional createdAt sort direction ASC or DESC | [default to ASC] since | optional.Time| Optional filter by sent after given date time | before | optional.Time| Optional filter by sent before given date time |

Return type

PageThreadProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetAliases

PageAlias GetAliases(ctx, optional)

Get all email aliases you have created

Get all email aliases in paginated form

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *GetAliasesOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetAliasesOpts struct

Name Type Description Notes
page optional.Int32 Optional page in alias list pagination [default to 0]
size optional.Int32 Optional page size in alias list pagination [default to 20]
sort optional.String Optional createdAt sort direction ASC or DESC [default to ASC]
since optional.Time Filter by created at after the given timestamp
before optional.Time Filter by created at before the given timestamp

Return type

PageAlias

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

ReplyToAliasEmail

SentEmailDto ReplyToAliasEmail(ctx, 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.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
aliasId string ID of the alias that email belongs to
emailId string ID of the email that should be replied to
replyToAliasEmailOptions ReplyToAliasEmailOptions

Return type

SentEmailDto

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]

SendAliasEmail

SentEmailDto SendAliasEmail(ctx, 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

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
aliasId string
sendEmailOptions SendEmailOptions

Return type

SentEmailDto

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]

UpdateAlias

AliasDto UpdateAlias(ctx, aliasId, updateAliasOptions)

Update an email alias

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
aliasId string
updateAliasOptions UpdateAliasOptions

Return type

AliasDto

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]