OAIAliasControllerApi

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

createAlias

-(NSURLSessionTask*) createAliasWithCreateAliasOptions: (OAICreateAliasOptions*) createAliasOptions
        completionHandler: (void (^)(OAIAliasDto* output, NSError* error)) handler;

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

OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];

// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];


OAICreateAliasOptions* createAliasOptions = [[OAICreateAliasOptions alloc] init]; // createAliasOptions

OAIAliasControllerApi*apiInstance = [[OAIAliasControllerApi alloc] init];

// 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.
[apiInstance createAliasWithCreateAliasOptions:createAliasOptions
          completionHandler: ^(OAIAliasDto* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIAliasControllerApi->createAlias: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
createAliasOptionsOAICreateAliasOptions*createAliasOptions

Return type

OAIAliasDto*

Authorization

API_KEY

HTTP request headers

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

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

deleteAlias

-(NSURLSessionTask*) deleteAliasWithAliasId: (NSString*) aliasId
        completionHandler: (void (^)(NSError* error)) handler;

Delete an email alias

Example

OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];

// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];


NSString* aliasId = @"aliasId_example"; // aliasId

OAIAliasControllerApi*apiInstance = [[OAIAliasControllerApi alloc] init];

// Delete an email alias
[apiInstance deleteAliasWithAliasId:aliasId
          completionHandler: ^(NSError* error) {
                        if (error) {
                            NSLog(@"Error calling OAIAliasControllerApi->deleteAlias: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
aliasIdNSString*aliasId

Return type

void (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

-(NSURLSessionTask*) getAliasWithAliasId: (NSString*) aliasId
        completionHandler: (void (^)(OAIAliasDto* output, NSError* error)) handler;

Get an email alias

Get an email alias by ID

Example

OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];

// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];


NSString* aliasId = @"aliasId_example"; // aliasId

OAIAliasControllerApi*apiInstance = [[OAIAliasControllerApi alloc] init];

// Get an email alias
[apiInstance getAliasWithAliasId:aliasId
          completionHandler: ^(OAIAliasDto* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIAliasControllerApi->getAlias: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
aliasIdNSString*aliasId

Return type

OAIAliasDto*

Authorization

API_KEY

HTTP request headers

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

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

getAliasEmails

-(NSURLSessionTask*) getAliasEmailsWithAliasId: (NSString*) aliasId
    page: (NSNumber*) page
    size: (NSNumber*) size
    sort: (NSString*) sort
        completionHandler: (void (^)(OAIPageEmailProjection* output, NSError* error)) handler;

Get emails for an alias

Get paginated emails for an alias by ID

Example

OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];

// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];


NSString* aliasId = @"aliasId_example"; // aliasId
NSNumber* page = @0; // Optional page  alias email list pagination (optional) (default to @0)
NSNumber* size = @20; // Optional page size alias email list pagination (optional) (default to @20)
NSString* sort = @"ASC"; // Optional createdAt sort direction ASC or DESC (optional) (default to @"ASC")

OAIAliasControllerApi*apiInstance = [[OAIAliasControllerApi alloc] init];

// Get emails for an alias
[apiInstance getAliasEmailsWithAliasId:aliasId
              page:page
              size:size
              sort:sort
          completionHandler: ^(OAIPageEmailProjection* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIAliasControllerApi->getAliasEmails: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
aliasIdNSString*aliasId
pageNSNumber*Optional page alias email list pagination[optional] [default to @0]
sizeNSNumber*Optional page size alias email list pagination[optional] [default to @20]
sortNSString*Optional createdAt sort direction ASC or DESC[optional] [default to @“ASC”]

Return type

OAIPageEmailProjection*

Authorization

API_KEY

HTTP request headers

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

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

getAliasThreads

-(NSURLSessionTask*) getAliasThreadsWithAliasId: (NSString*) aliasId
    page: (NSNumber*) page
    size: (NSNumber*) size
    sort: (NSString*) sort
        completionHandler: (void (^)(OAIPageThreadProjection* output, NSError* error)) handler;

Get threads created for an alias

Returns threads created for an email alias in paginated form

Example

OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];

// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];


NSString* aliasId = @"aliasId_example"; // aliasId
NSNumber* page = @0; // Optional page  in thread list pagination (optional) (default to @0)
NSNumber* size = @20; // Optional page size in thread list pagination (optional) (default to @20)
NSString* sort = @"ASC"; // Optional createdAt sort direction ASC or DESC (optional) (default to @"ASC")

OAIAliasControllerApi*apiInstance = [[OAIAliasControllerApi alloc] init];

// Get threads created for an alias
[apiInstance getAliasThreadsWithAliasId:aliasId
              page:page
              size:size
              sort:sort
          completionHandler: ^(OAIPageThreadProjection* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIAliasControllerApi->getAliasThreads: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
aliasIdNSString*aliasId
pageNSNumber*Optional page in thread list pagination[optional] [default to @0]
sizeNSNumber*Optional page size in thread list pagination[optional] [default to @20]
sortNSString*Optional createdAt sort direction ASC or DESC[optional] [default to @“ASC”]

Return type

OAIPageThreadProjection*

Authorization

API_KEY

HTTP request headers

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

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

getAliases

-(NSURLSessionTask*) getAliasesWithPage: (NSNumber*) page
    size: (NSNumber*) size
    sort: (NSString*) sort
        completionHandler: (void (^)(OAIPageAlias* output, NSError* error)) handler;

Get all email aliases you have created

Get all email aliases in paginated form

Example

OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];

// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];


NSNumber* page = @0; // Optional page  in alias list pagination (optional) (default to @0)
NSNumber* size = @20; // Optional page size in alias list pagination (optional) (default to @20)
NSString* sort = @"ASC"; // Optional createdAt sort direction ASC or DESC (optional) (default to @"ASC")

OAIAliasControllerApi*apiInstance = [[OAIAliasControllerApi alloc] init];

// Get all email aliases you have created
[apiInstance getAliasesWithPage:page
              size:size
              sort:sort
          completionHandler: ^(OAIPageAlias* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIAliasControllerApi->getAliases: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
pageNSNumber*Optional page in alias list pagination[optional] [default to @0]
sizeNSNumber*Optional page size in alias list pagination[optional] [default to @20]
sortNSString*Optional createdAt sort direction ASC or DESC[optional] [default to @“ASC”]

Return type

OAIPageAlias*

Authorization

API_KEY

HTTP request headers

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

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

replyToAliasEmail

-(NSURLSessionTask*) replyToAliasEmailWithAliasId: (NSString*) aliasId
    emailId: (NSString*) emailId
    replyToAliasEmailOptions: (OAIReplyToAliasEmailOptions*) replyToAliasEmailOptions
        completionHandler: (void (^)(OAISentEmailDto* output, NSError* error)) handler;

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

OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];

// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];


NSString* aliasId = @"aliasId_example"; // ID of the alias that email belongs to
NSString* emailId = @"emailId_example"; // ID of the email that should be replied to
OAIReplyToAliasEmailOptions* replyToAliasEmailOptions = [[OAIReplyToAliasEmailOptions alloc] init]; // replyToAliasEmailOptions

OAIAliasControllerApi*apiInstance = [[OAIAliasControllerApi alloc] init];

// Reply to an email
[apiInstance replyToAliasEmailWithAliasId:aliasId
              emailId:emailId
              replyToAliasEmailOptions:replyToAliasEmailOptions
          completionHandler: ^(OAISentEmailDto* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIAliasControllerApi->replyToAliasEmail: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
aliasIdNSString*ID of the alias that email belongs to
emailIdNSString*ID of the email that should be replied to
replyToAliasEmailOptionsOAIReplyToAliasEmailOptions*replyToAliasEmailOptions

Return type

OAISentEmailDto*

Authorization

API_KEY

HTTP request headers

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

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

sendAliasEmail

-(NSURLSessionTask*) sendAliasEmailWithAliasId: (NSString*) aliasId
    sendEmailOptions: (OAISendEmailOptions*) sendEmailOptions
        completionHandler: (void (^)(OAISentEmailDto* output, NSError* error)) handler;

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

OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];

// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];


NSString* aliasId = @"aliasId_example"; // aliasId
OAISendEmailOptions* sendEmailOptions = [[OAISendEmailOptions alloc] init]; // Options for the email to be sent (optional)

OAIAliasControllerApi*apiInstance = [[OAIAliasControllerApi alloc] init];

// Send an email from an alias inbox
[apiInstance sendAliasEmailWithAliasId:aliasId
              sendEmailOptions:sendEmailOptions
          completionHandler: ^(OAISentEmailDto* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIAliasControllerApi->sendAliasEmail: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
aliasIdNSString*aliasId
sendEmailOptionsOAISendEmailOptions*Options for the email to be sent[optional]

Return type

OAISentEmailDto*

Authorization

API_KEY

HTTP request headers

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

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

updateAlias

-(NSURLSessionTask*) updateAliasWithAliasId: (NSString*) aliasId
    updateAliasOptions: (OAIUpdateAliasOptions*) updateAliasOptions
        completionHandler: (void (^)(NSError* error)) handler;

Update an email alias

Example

OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];

// Configure API key authorization: (authentication scheme: API_KEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];


NSString* aliasId = @"aliasId_example"; // aliasId
OAIUpdateAliasOptions* updateAliasOptions = [[OAIUpdateAliasOptions alloc] init]; // updateAliasOptions

OAIAliasControllerApi*apiInstance = [[OAIAliasControllerApi alloc] init];

// Update an email alias
[apiInstance updateAliasWithAliasId:aliasId
              updateAliasOptions:updateAliasOptions
          completionHandler: ^(NSError* error) {
                        if (error) {
                            NSLog(@"Error calling OAIAliasControllerApi->updateAlias: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
aliasIdNSString*aliasId
updateAliasOptionsOAIUpdateAliasOptions*updateAliasOptions

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

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

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