Interface IAliasControllerApiAsync
Represents a collection of functions to interact with the API endpoints
Inherited Members
Namespace: mailslurp.Api
Assembly: mailslurp.dll
Syntax
public interface IAliasControllerApiAsync : IApiAccessor
Methods
View SourceCreateAliasAsync(CreateAliasOptions, int, CancellationToken)
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.
Declaration
Task<AliasDto> CreateAliasAsync(CreateAliasOptions createAliasOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CreateAliasOptions | createAliasOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<AliasDto> | Task of AliasDto |
Remarks
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
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
CreateAliasWithHttpInfoAsync(CreateAliasOptions, int, CancellationToken)
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.
Declaration
Task<ApiResponse<AliasDto>> CreateAliasWithHttpInfoAsync(CreateAliasOptions createAliasOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CreateAliasOptions | createAliasOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<AliasDto>> | Task of ApiResponse (AliasDto) |
Remarks
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
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
DeleteAliasAsync(Guid, int, CancellationToken)
Delete an email alias
Declaration
Task DeleteAliasAsync(Guid aliasId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | aliasId | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task | Task of void |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
DeleteAliasWithHttpInfoAsync(Guid, int, CancellationToken)
Delete an email alias
Declaration
Task<ApiResponse<object>> DeleteAliasWithHttpInfoAsync(Guid aliasId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | aliasId | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<object>> | Task of ApiResponse |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetAliasAsync(Guid, int, CancellationToken)
Get an email alias
Declaration
Task<AliasDto> GetAliasAsync(Guid aliasId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | aliasId | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<AliasDto> | Task of AliasDto |
Remarks
Get an email alias by ID
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetAliasEmailsAsync(Guid, int?, int?, string, DateTime?, DateTime?, int, CancellationToken)
Get emails for an alias
Declaration
Task<PageEmailProjection> GetAliasEmailsAsync(Guid aliasId, int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | aliasId | |
int? | page | Optional page index alias email list pagination (optional, default to 0) |
int? | size | Optional page size alias email list pagination (optional, default to 20) |
string | sort | Optional createdAt sort direction ASC or DESC (optional, default to ASC) |
DateTime? | since | Optional filter by sent after given date time (optional) |
DateTime? | before | Optional filter by sent before given date time (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<PageEmailProjection> | Task of PageEmailProjection |
Remarks
Get paginated emails for an alias by ID
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetAliasEmailsWithHttpInfoAsync(Guid, int?, int?, string, DateTime?, DateTime?, int, CancellationToken)
Get emails for an alias
Declaration
Task<ApiResponse<PageEmailProjection>> GetAliasEmailsWithHttpInfoAsync(Guid aliasId, int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | aliasId | |
int? | page | Optional page index alias email list pagination (optional, default to 0) |
int? | size | Optional page size alias email list pagination (optional, default to 20) |
string | sort | Optional createdAt sort direction ASC or DESC (optional, default to ASC) |
DateTime? | since | Optional filter by sent after given date time (optional) |
DateTime? | before | Optional filter by sent before given date time (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<PageEmailProjection>> | Task of ApiResponse (PageEmailProjection) |
Remarks
Get paginated emails for an alias by ID
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetAliasesAsync(string, int?, int?, string, DateTime?, DateTime?, int, CancellationToken)
Get all email aliases you have created
Declaration
Task<PageAlias> GetAliasesAsync(string search = null, int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | search | Optional search term (optional) |
int? | page | Optional page index in alias list pagination (optional, default to 0) |
int? | size | Optional page size in alias list pagination (optional, default to 20) |
string | sort | Optional createdAt sort direction ASC or DESC (optional, default to ASC) |
DateTime? | since | Filter by created at after the given timestamp (optional) |
DateTime? | before | Filter by created at before the given timestamp (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<PageAlias> | Task of PageAlias |
Remarks
Get all email aliases in paginated form
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetAliasesWithHttpInfoAsync(string, int?, int?, string, DateTime?, DateTime?, int, CancellationToken)
Get all email aliases you have created
Declaration
Task<ApiResponse<PageAlias>> GetAliasesWithHttpInfoAsync(string search = null, int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | search | Optional search term (optional) |
int? | page | Optional page index in alias list pagination (optional, default to 0) |
int? | size | Optional page size in alias list pagination (optional, default to 20) |
string | sort | Optional createdAt sort direction ASC or DESC (optional, default to ASC) |
DateTime? | since | Filter by created at after the given timestamp (optional) |
DateTime? | before | Filter by created at before the given timestamp (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<PageAlias>> | Task of ApiResponse (PageAlias) |
Remarks
Get all email aliases in paginated form
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetAliasThreadsAsync(Guid, int?, int?, string, DateTime?, DateTime?, int, CancellationToken)
Get threads created for an alias
Declaration
Task<PageThreadProjection> GetAliasThreadsAsync(Guid aliasId, int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | aliasId | |
int? | page | Optional page index in thread list pagination (optional, default to 0) |
int? | size | Optional page size in thread list pagination (optional, default to 20) |
string | sort | Optional createdAt sort direction ASC or DESC (optional, default to ASC) |
DateTime? | since | Optional filter by sent after given date time (optional) |
DateTime? | before | Optional filter by sent before given date time (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<PageThreadProjection> | Task of PageThreadProjection |
Remarks
Returns threads created for an email alias in paginated form
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetAliasThreadsWithHttpInfoAsync(Guid, int?, int?, string, DateTime?, DateTime?, int, CancellationToken)
Get threads created for an alias
Declaration
Task<ApiResponse<PageThreadProjection>> GetAliasThreadsWithHttpInfoAsync(Guid aliasId, int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | aliasId | |
int? | page | Optional page index in thread list pagination (optional, default to 0) |
int? | size | Optional page size in thread list pagination (optional, default to 20) |
string | sort | Optional createdAt sort direction ASC or DESC (optional, default to ASC) |
DateTime? | since | Optional filter by sent after given date time (optional) |
DateTime? | before | Optional filter by sent before given date time (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<PageThreadProjection>> | Task of ApiResponse (PageThreadProjection) |
Remarks
Returns threads created for an email alias in paginated form
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetAliasWithHttpInfoAsync(Guid, int, CancellationToken)
Get an email alias
Declaration
Task<ApiResponse<AliasDto>> GetAliasWithHttpInfoAsync(Guid aliasId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | aliasId | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<AliasDto>> | Task of ApiResponse (AliasDto) |
Remarks
Get an email alias by ID
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetThreadAsync(Guid, int, CancellationToken)
Get a thread
Declaration
Task<ThreadProjection> GetThreadAsync(Guid threadId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | threadId | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ThreadProjection> | Task of ThreadProjection |
Remarks
Return a thread associated with an alias
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetThreadsPaginatedAsync(int?, int?, string, DateTime?, DateTime?, int, CancellationToken)
Get all threads
Declaration
Task<PageThreadProjection> GetThreadsPaginatedAsync(int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int? | page | Optional page index in thread list pagination (optional, default to 0) |
int? | size | Optional page size in thread list pagination (optional, default to 20) |
string | sort | Optional createdAt sort direction ASC or DESC (optional, default to ASC) |
DateTime? | since | Optional filter by sent after given date time (optional) |
DateTime? | before | Optional filter by sent before given date time (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<PageThreadProjection> | Task of PageThreadProjection |
Remarks
Returns threads created for all aliases in paginated form
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetThreadsPaginatedWithHttpInfoAsync(int?, int?, string, DateTime?, DateTime?, int, CancellationToken)
Get all threads
Declaration
Task<ApiResponse<PageThreadProjection>> GetThreadsPaginatedWithHttpInfoAsync(int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int? | page | Optional page index in thread list pagination (optional, default to 0) |
int? | size | Optional page size in thread list pagination (optional, default to 20) |
string | sort | Optional createdAt sort direction ASC or DESC (optional, default to ASC) |
DateTime? | since | Optional filter by sent after given date time (optional) |
DateTime? | before | Optional filter by sent before given date time (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<PageThreadProjection>> | Task of ApiResponse (PageThreadProjection) |
Remarks
Returns threads created for all aliases in paginated form
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetThreadWithHttpInfoAsync(Guid, int, CancellationToken)
Get a thread
Declaration
Task<ApiResponse<ThreadProjection>> GetThreadWithHttpInfoAsync(Guid threadId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | threadId | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<ThreadProjection>> | Task of ApiResponse (ThreadProjection) |
Remarks
Return a thread associated with an alias
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
ReplyToAliasEmailAsync(Guid, Guid, ReplyToAliasEmailOptions, int, CancellationToken)
Reply to an email
Declaration
Task<SentEmailDto> ReplyToAliasEmailAsync(Guid aliasId, Guid emailId, ReplyToAliasEmailOptions replyToAliasEmailOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | aliasId | ID of the alias that email belongs to |
System.Guid | emailId | ID of the email that should be replied to |
ReplyToAliasEmailOptions | replyToAliasEmailOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<SentEmailDto> | Task of SentEmailDto |
Remarks
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
.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
ReplyToAliasEmailWithHttpInfoAsync(Guid, Guid, ReplyToAliasEmailOptions, int, CancellationToken)
Reply to an email
Declaration
Task<ApiResponse<SentEmailDto>> ReplyToAliasEmailWithHttpInfoAsync(Guid aliasId, Guid emailId, ReplyToAliasEmailOptions replyToAliasEmailOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | aliasId | ID of the alias that email belongs to |
System.Guid | emailId | ID of the email that should be replied to |
ReplyToAliasEmailOptions | replyToAliasEmailOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<SentEmailDto>> | Task of ApiResponse (SentEmailDto) |
Remarks
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
.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
SendAliasEmailAsync(Guid, SendEmailOptions, int, CancellationToken)
Send an email from an alias inbox
Declaration
Task<SentEmailDto> SendAliasEmailAsync(Guid aliasId, SendEmailOptions sendEmailOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | aliasId | |
SendEmailOptions | sendEmailOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<SentEmailDto> | Task of SentEmailDto |
Remarks
Send an email from an alias. Replies to the email will be forwarded to the alias masked email address
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
SendAliasEmailWithHttpInfoAsync(Guid, SendEmailOptions, int, CancellationToken)
Send an email from an alias inbox
Declaration
Task<ApiResponse<SentEmailDto>> SendAliasEmailWithHttpInfoAsync(Guid aliasId, SendEmailOptions sendEmailOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | aliasId | |
SendEmailOptions | sendEmailOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<SentEmailDto>> | Task of ApiResponse (SentEmailDto) |
Remarks
Send an email from an alias. Replies to the email will be forwarded to the alias masked email address
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
UpdateAliasAsync(Guid, UpdateAliasOptions, int, CancellationToken)
Update an email alias
Declaration
Task<AliasDto> UpdateAliasAsync(Guid aliasId, UpdateAliasOptions updateAliasOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | aliasId | |
UpdateAliasOptions | updateAliasOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<AliasDto> | Task of AliasDto |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
UpdateAliasWithHttpInfoAsync(Guid, UpdateAliasOptions, int, CancellationToken)
Update an email alias
Declaration
Task<ApiResponse<AliasDto>> UpdateAliasWithHttpInfoAsync(Guid aliasId, UpdateAliasOptions updateAliasOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | aliasId | |
UpdateAliasOptions | updateAliasOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<AliasDto>> | Task of ApiResponse (AliasDto) |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |