# 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*) createNewEmailAddressWithExpiresAt: (NSDate*) expiresAt
expiresIn: (NSNumber*) expiresIn
useDomainPool: (NSNumber*) useDomainPool
completionHandler: (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"];
NSDate* expiresAt = @"2013-10-20T19:20:30+01:00"; // expiresAt (optional)
NSNumber* expiresIn = @56; // expiresIn (optional)
NSNumber* useDomainPool = @56; // useDomainPool (optional)
OAICommonActionsControllerApi*apiInstance = [[OAICommonActionsControllerApi alloc] init];
// Create new random inbox
[apiInstance createNewEmailAddressWithExpiresAt:expiresAt
expiresIn:expiresIn
useDomainPool:useDomainPool
completionHandler: ^(OAIInbox* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAICommonActionsControllerApi->createNewEmailAddress: %@", error);
}
}];
# Parameters
Name | Type | Description | Notes |
---|---|---|---|
expiresAt | NSDate* | expiresAt | [optional] |
expiresIn | NSNumber* | expiresIn | [optional] |
useDomainPool | NSNumber* | useDomainPool | [optional] |
# Return type
# Authorization
# 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*) createNewEmailAddress1WithExpiresAt: (NSDate*) expiresAt
expiresIn: (NSNumber*) expiresIn
useDomainPool: (NSNumber*) useDomainPool
completionHandler: (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"];
NSDate* expiresAt = @"2013-10-20T19:20:30+01:00"; // expiresAt (optional)
NSNumber* expiresIn = @56; // expiresIn (optional)
NSNumber* useDomainPool = @56; // useDomainPool (optional)
OAICommonActionsControllerApi*apiInstance = [[OAICommonActionsControllerApi alloc] init];
// Create new random inbox
[apiInstance createNewEmailAddress1WithExpiresAt:expiresAt
expiresIn:expiresIn
useDomainPool:useDomainPool
completionHandler: ^(OAIInbox* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAICommonActionsControllerApi->createNewEmailAddress1: %@", error);
}
}];
# Parameters
Name | Type | Description | Notes |
---|---|---|---|
expiresAt | NSDate* | expiresAt | [optional] |
expiresIn | NSNumber* | expiresIn | [optional] |
useDomainPool | NSNumber* | useDomainPool | [optional] |
# Return type
# Authorization
# 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
# 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
# HTTP request headers
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]