# OAICommonActionsControllerApi

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

Method HTTP request Description
createNewEmailAddress POST /createInbox Create new random inbox
createNewEmailAddress1 POST /newEmailAddress Create new random inbox
emptyInbox DELETE /emptyInbox Delete all emails in an inbox
sendEmailSimple POST /sendEmail Send an email

# createNewEmailAddress

-(NSURLSessionTask*) createNewEmailAddressWithCompletionHandler: 
        (void (^)(OAIInbox* output, NSError* error)) handler;

Create new random inbox

Returns an Inbox with an id and an emailAddress

# 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"];
OAICommonActionsControllerApi*apiInstance = [[OAICommonActionsControllerApi alloc] init];
// Create new random inbox
[apiInstance createNewEmailAddressWithCompletionHandler: 
          ^(OAIInbox* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAICommonActionsControllerApi->createNewEmailAddress: %@", error);
                        }
                    }];

# Parameters

This endpoint does not need any parameter.

# Return type

OAIInbox*

# 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 README]

# createNewEmailAddress1

-(NSURLSessionTask*) createNewEmailAddress1WithCompletionHandler: 
        (void (^)(OAIInbox* output, NSError* error)) handler;

Create new random inbox

Returns an Inbox with an id and an emailAddress

# 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"];
OAICommonActionsControllerApi*apiInstance = [[OAICommonActionsControllerApi alloc] init];
// Create new random inbox
[apiInstance createNewEmailAddress1WithCompletionHandler: 
          ^(OAIInbox* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAICommonActionsControllerApi->createNewEmailAddress1: %@", error);
                        }
                    }];

# Parameters

This endpoint does not need any parameter.

# Return type

OAIInbox*

# 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 README]

# emptyInbox

-(NSURLSessionTask*) emptyInboxWithInboxId: (NSString*) inboxId
        completionHandler: (void (^)(NSError* error)) handler;

Delete all emails in an inbox

Deletes all emails

# 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* inboxId = @"inboxId_example"; // inboxId
OAICommonActionsControllerApi*apiInstance = [[OAICommonActionsControllerApi alloc] init];
// Delete all emails in an inbox
[apiInstance emptyInboxWithInboxId:inboxId
          completionHandler: ^(NSError* error) {
                        if (error) {
                            NSLog(@"Error calling OAICommonActionsControllerApi->emptyInbox: %@", error);
                        }
                    }];

# Parameters

Name Type Description Notes
inboxId NSString* inboxId

# 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 README]

# sendEmailSimple

-(NSURLSessionTask*) sendEmailSimpleWithEmailOptions: (OAISimpleSendEmailOptions*) emailOptions
        completionHandler: (void (^)(NSError* error)) handler;

Send an email

If no senderId or inboxId provided a random email address will be used to send from.

# 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"];
OAISimpleSendEmailOptions* emailOptions = [[OAISimpleSendEmailOptions alloc] init]; // emailOptions
OAICommonActionsControllerApi*apiInstance = [[OAICommonActionsControllerApi alloc] init];
// Send an email
[apiInstance sendEmailSimpleWithEmailOptions:emailOptions
          completionHandler: ^(NSError* error) {
                        if (error) {
                            NSLog(@"Error calling OAICommonActionsControllerApi->sendEmailSimple: %@", error);
                        }
                    }];

# Parameters

Name Type Description Notes
emailOptions OAISimpleSendEmailOptions* emailOptions

# Return type

void (empty response body)

# Authorization

API_KEY

# HTTP request headers

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

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