OAIInboxControllerApi

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

MethodHTTP requestDescription
createInboxPOST /inboxesCreate an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either SMTP or HTTP inboxes.
createInboxRulesetPOST /inboxes/{inboxId}/rulesetsCreate an inbox ruleset
createInboxWithDefaultsPOST /inboxes/withDefaultsCreate an inbox with default options. Uses MailSlurp domain pool address and is private.
createInboxWithOptionsPOST /inboxes/withOptionsCreate an inbox with options. Extended options for inbox creation.
deleteAllInboxesDELETE /inboxesDelete all inboxes
deleteInboxDELETE /inboxes/{inboxId}Delete inbox
getAllInboxesGET /inboxes/paginatedList All Inboxes Paginated
getEmailsGET /inboxes/{inboxId}/emailsGet emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead.
getInboxGET /inboxes/{inboxId}Get Inbox. Returns properties of an inbox.
getInboxEmailsPaginatedGET /inboxes/{inboxId}/emails/paginatedGet inbox emails paginated
getInboxSentEmailsGET /inboxes/{inboxId}/sentGet Inbox Sent Emails
getInboxTagsGET /inboxes/tagsGet inbox tags
getInboxesGET /inboxesList Inboxes and email addresses
getOrganizationInboxesGET /inboxes/organizationList Organization Inboxes Paginated
listInboxRulesetsGET /inboxes/{inboxId}/rulesetsList inbox rulesets
listInboxTrackingPixelsGET /inboxes/{inboxId}/tracking-pixelsList inbox tracking pixels
sendEmailPOST /inboxes/{inboxId}Send Email
sendEmailAndConfirmPOST /inboxes/{inboxId}/confirmSend email and return sent confirmation
sendTestEmailPOST /inboxes/{inboxId}/send-test-emailSend a test email to inbox
setInboxFavouritedPUT /inboxes/{inboxId}/favouriteSet inbox favourited state
updateInboxPATCH /inboxes/{inboxId}Update Inbox. Change name and description. Email address is not editable.

createInbox

-(NSURLSessionTask*) createInboxWithAllowTeamAccess: (NSNumber*) allowTeamAccess
    _description: (NSString*) _description
    emailAddress: (NSString*) emailAddress
    expiresAt: (NSDate*) expiresAt
    expiresIn: (NSNumber*) expiresIn
    favourite: (NSNumber*) favourite
    inboxType: (NSString*) inboxType
    name: (NSString*) name
    tags: (NSArray<NSString*>*) tags
    useDomainPool: (NSNumber*) useDomainPool
        completionHandler: (void (^)(OAIInbox* output, NSError* error)) handler;

Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either SMTP or HTTP inboxes.

Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty.

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* allowTeamAccess = @56; // DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization. (optional)
NSString* _description = @"_description_example"; // Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with (optional)
NSString* emailAddress = @"emailAddress_example"; // A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so `SMTP` inboxes will only work with `SMTP` type domains. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. (optional)
NSDate* expiresAt = @"2013-10-20T19:20:30+01:00"; // Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX. (optional)
NSNumber* expiresIn = @56; // Number of milliseconds that inbox should exist for (optional)
NSNumber* favourite = @56; // Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering (optional)
NSString* inboxType = @"inboxType_example"; // HTTP (default) or SMTP inbox type. HTTP inboxes are best for testing while SMTP inboxes are more reliable for public inbound email consumption. When using custom domains the domain type must match the inbox type. HTTP inboxes are processed by AWS SES while SMTP inboxes use a custom mail server running at `mx.mailslurp.com`. (optional)
NSString* name = @"name_example"; // Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails. (optional)
NSArray<NSString*>* tags = @[@"tags_example"]; // Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. (optional)
NSNumber* useDomainPool = @56; // Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field. Note this feature is only available for `HTTP` inbox types. (optional)

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

// Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either `SMTP` or `HTTP` inboxes.
[apiInstance createInboxWithAllowTeamAccess:allowTeamAccess
              _description:_description
              emailAddress:emailAddress
              expiresAt:expiresAt
              expiresIn:expiresIn
              favourite:favourite
              inboxType:inboxType
              name:name
              tags:tags
              useDomainPool:useDomainPool
          completionHandler: ^(OAIInbox* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIInboxControllerApi->createInbox: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
allowTeamAccessNSNumber*DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization.[optional]
_descriptionNSString*Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with[optional]
emailAddressNSString*A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as 123@mailslurp.com. If you use the useDomainPool option when the email address is null it will generate an email address with a more varied domain ending such as 123@mailslurp.info or 123@mailslurp.biz. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so SMTP inboxes will only work with SMTP type domains. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID.[optional]
expiresAtNSDate*Optional inbox expiration date. If null then this inbox is permanent and the emails in it won’t be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd’T’HH:mm:ss.SSSXXX.[optional]
expiresInNSNumber*Number of milliseconds that inbox should exist for[optional]
favouriteNSNumber*Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering[optional]
inboxTypeNSString*HTTP (default) or SMTP inbox type. HTTP inboxes are best for testing while SMTP inboxes are more reliable for public inbound email consumption. When using custom domains the domain type must match the inbox type. HTTP inboxes are processed by AWS SES while SMTP inboxes use a custom mail server running at mx.mailslurp.com.[optional]
nameNSString*Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails.[optional]
tagsNSArray<NSString>**Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI.[optional]
useDomainPoolNSNumber*Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default @mailslurp.com email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in @mailslurp.{world,info,xyz,...} . This means a TLD is randomly selecting from a list of .biz, .info, .xyz etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of @mailslurp.com or custom email address provided by the emailAddress field. Note this feature is only available for HTTP inbox types.[optional]

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 ]

createInboxRuleset

-(NSURLSessionTask*) createInboxRulesetWithInboxId: (NSString*) inboxId
    createInboxRulesetOptions: (OAICreateInboxRulesetOptions*) createInboxRulesetOptions
        completionHandler: (void (^)(OAIInboxRulesetDto* output, NSError* error)) handler;

Create an inbox ruleset

Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving

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
OAICreateInboxRulesetOptions* createInboxRulesetOptions = [[OAICreateInboxRulesetOptions alloc] init]; // createInboxRulesetOptions

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

// Create an inbox ruleset
[apiInstance createInboxRulesetWithInboxId:inboxId
              createInboxRulesetOptions:createInboxRulesetOptions
          completionHandler: ^(OAIInboxRulesetDto* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIInboxControllerApi->createInboxRuleset: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
inboxIdNSString*inboxId
createInboxRulesetOptionsOAICreateInboxRulesetOptions*createInboxRulesetOptions

Return type

OAIInboxRulesetDto*

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 ]

createInboxWithDefaults

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

Create an inbox with default options. Uses MailSlurp domain pool address and is private.

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"];



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

// Create an inbox with default options. Uses MailSlurp domain pool address and is private.
[apiInstance createInboxWithDefaultsWithCompletionHandler: 
          ^(OAIInbox* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIInboxControllerApi->createInboxWithDefaults: %@", 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 ]

createInboxWithOptions

-(NSURLSessionTask*) createInboxWithOptionsWithCreateInboxDto: (OAICreateInboxDto*) createInboxDto
        completionHandler: (void (^)(OAIInbox* output, NSError* error)) handler;

Create an inbox with options. Extended options for inbox creation.

Additional endpoint that allows inbox creation with request body options. Can be more flexible that other methods for some clients.

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"];


OAICreateInboxDto* createInboxDto = [[OAICreateInboxDto alloc] init]; // createInboxDto

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

// Create an inbox with options. Extended options for inbox creation.
[apiInstance createInboxWithOptionsWithCreateInboxDto:createInboxDto
          completionHandler: ^(OAIInbox* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIInboxControllerApi->createInboxWithOptions: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
createInboxDtoOAICreateInboxDto*createInboxDto

Return type

OAIInbox*

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 ]

deleteAllInboxes

-(NSURLSessionTask*) deleteAllInboxesWithCompletionHandler: 
        (void (^)(NSError* error)) handler;

Delete all inboxes

Permanently delete all inboxes and associated email addresses. This will also delete all emails within the inboxes. Be careful as inboxes cannot be recovered once deleted. Note: deleting inboxes will not impact your usage limits. Monthly inbox creation limits are based on how many inboxes were created in the last 30 days, not how many inboxes you currently have.

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"];



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

// Delete all inboxes
[apiInstance deleteAllInboxesWithCompletionHandler: 
          ^(NSError* error) {
                        if (error) {
                            NSLog(@"Error calling OAIInboxControllerApi->deleteAllInboxes: %@", error);
                        }
                    }];

Parameters

This endpoint does not need any parameter.

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 ]

deleteInbox

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

Delete inbox

Permanently delete an inbox and associated email address as well as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request.

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

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

// Delete inbox
[apiInstance deleteInboxWithInboxId:inboxId
          completionHandler: ^(NSError* error) {
                        if (error) {
                            NSLog(@"Error calling OAIInboxControllerApi->deleteInbox: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
inboxIdNSString*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 ]

getAllInboxes

-(NSURLSessionTask*) getAllInboxesWithBefore: (NSDate*) before
    favourite: (NSNumber*) favourite
    page: (NSNumber*) page
    search: (NSString*) search
    since: (NSDate*) since
    size: (NSNumber*) size
    sort: (NSString*) sort
    tag: (NSString*) tag
    teamAccess: (NSNumber*) teamAccess
        completionHandler: (void (^)(OAIPageInboxProjection* output, NSError* error)) handler;

List All Inboxes Paginated

List inboxes in paginated form. The results are available on the content property of the returned object. This method allows for page (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative getInboxes method returns a full list of inboxes but is limited to 100 results.

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* before = @"2013-10-20T19:20:30+01:00"; // Optional filter by created before given date time (optional)
NSNumber* favourite = @(NO); // Optionally filter results for favourites only (optional) (default to @(NO))
NSNumber* page = @0; // Optional page  in list pagination (optional) (default to @0)
NSString* search = @"search_example"; // Optionally filter by search words partial matching ID, tags, name, and email address (optional)
NSDate* since = @"2013-10-20T19:20:30+01:00"; // Optional filter by created after given date time (optional)
NSNumber* size = @20; // Optional page size in list pagination (optional) (default to @20)
NSString* sort = @"ASC"; // Optional createdAt sort direction ASC or DESC (optional) (default to @"ASC")
NSString* tag = @"tag_example"; // Optionally filter by tags. Will return inboxes that include given tags (optional)
NSNumber* teamAccess = @(NO); // DEPRECATED. Optionally filter by team access. (optional) (default to @(NO))

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

// List All Inboxes Paginated
[apiInstance getAllInboxesWithBefore:before
              favourite:favourite
              page:page
              search:search
              since:since
              size:size
              sort:sort
              tag:tag
              teamAccess:teamAccess
          completionHandler: ^(OAIPageInboxProjection* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIInboxControllerApi->getAllInboxes: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
beforeNSDate*Optional filter by created before given date time[optional]
favouriteNSNumber*Optionally filter results for favourites only[optional] [default to @(NO)]
pageNSNumber*Optional page in list pagination[optional] [default to @0]
searchNSString*Optionally filter by search words partial matching ID, tags, name, and email address[optional]
sinceNSDate*Optional filter by created after given date time[optional]
sizeNSNumber*Optional page size in list pagination[optional] [default to @20]
sortNSString*Optional createdAt sort direction ASC or DESC[optional] [default to @“ASC”]
tagNSString*Optionally filter by tags. Will return inboxes that include given tags[optional]
teamAccessNSNumber*DEPRECATED. Optionally filter by team access.[optional] [default to @(NO)]

Return type

OAIPageInboxProjection*

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 ]

getEmails

-(NSURLSessionTask*) getEmailsWithInboxId: (NSString*) inboxId
    before: (NSDate*) before
    delayTimeout: (NSNumber*) delayTimeout
    limit: (NSNumber*) limit
    minCount: (NSNumber*) minCount
    retryTimeout: (NSNumber*) retryTimeout
    since: (NSDate*) since
    size: (NSNumber*) size
    sort: (NSString*) sort
    unreadOnly: (NSNumber*) unreadOnly
        completionHandler: (void (^)(NSArray<OAIEmailPreview>* output, NSError* error)) handler;

Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead.

List emails that an inbox has received. Only emails that are sent to the inbox’s email address will appear in the inbox. It may take several seconds for any email you send to an inbox’s email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the minCount parameter. The server will retry the inbox database until the minCount is satisfied or the retryTimeout is reached

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"; // Id of inbox that emails belongs to
NSDate* before = @"2013-10-20T19:20:30+01:00"; // Exclude emails received after this ISO 8601 date time (optional)
NSNumber* delayTimeout = @56; // delayTimeout (optional)
NSNumber* limit = @56; // Limit the result set, ordered by received date time sort direction. Maximum 100. For more listing options see the email controller (optional)
NSNumber* minCount = @56; // Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached. (optional)
NSNumber* retryTimeout = @56; // Maximum milliseconds to spend retrying inbox database until minCount emails are returned (optional)
NSDate* since = @"2013-10-20T19:20:30+01:00"; // Exclude emails received before this ISO 8601 date time (optional)
NSNumber* size = @56; // Alias for limit. Assessed first before assessing any passed limit. (optional)
NSString* sort = @"sort_example"; // Sort the results by received date and direction ASC or DESC (optional)
NSNumber* unreadOnly = @56; // unreadOnly (optional)

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

// Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead.
[apiInstance getEmailsWithInboxId:inboxId
              before:before
              delayTimeout:delayTimeout
              limit:limit
              minCount:minCount
              retryTimeout:retryTimeout
              since:since
              size:size
              sort:sort
              unreadOnly:unreadOnly
          completionHandler: ^(NSArray<OAIEmailPreview>* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIInboxControllerApi->getEmails: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
inboxIdNSString*Id of inbox that emails belongs to
beforeNSDate*Exclude emails received after this ISO 8601 date time[optional]
delayTimeoutNSNumber*delayTimeout[optional]
limitNSNumber*Limit the result set, ordered by received date time sort direction. Maximum 100. For more listing options see the email controller[optional]
minCountNSNumber*Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached.[optional]
retryTimeoutNSNumber*Maximum milliseconds to spend retrying inbox database until minCount emails are returned[optional]
sinceNSDate*Exclude emails received before this ISO 8601 date time[optional]
sizeNSNumber*Alias for limit. Assessed first before assessing any passed limit.[optional]
sortNSString*Sort the results by received date and direction ASC or DESC[optional]
unreadOnlyNSNumber*unreadOnly[optional]

Return type

NSArray*

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 ]

getInbox

-(NSURLSessionTask*) getInboxWithInboxId: (NSString*) inboxId
        completionHandler: (void (^)(OAIInbox* output, NSError* error)) handler;

Get Inbox. Returns properties of an inbox.

Returns an inbox’s properties, including its email address and 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* inboxId = @"inboxId_example"; // inboxId

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

// Get Inbox. Returns properties of an inbox.
[apiInstance getInboxWithInboxId:inboxId
          completionHandler: ^(OAIInbox* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIInboxControllerApi->getInbox: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
inboxIdNSString*inboxId

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 ]

getInboxEmailsPaginated

-(NSURLSessionTask*) getInboxEmailsPaginatedWithInboxId: (NSString*) inboxId
    before: (NSDate*) before
    page: (NSNumber*) page
    since: (NSDate*) since
    size: (NSNumber*) size
    sort: (NSString*) sort
        completionHandler: (void (^)(OAIPageEmailPreview* output, NSError* error)) handler;

Get inbox emails paginated

Get a paginated list of emails in an inbox. Does not hold connections open.

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"; // Id of inbox that emails belongs to
NSDate* before = @"2013-10-20T19:20:30+01:00"; // Optional filter by received before given date time (optional)
NSNumber* page = @0; // Optional page  in inbox emails list pagination (optional) (default to @0)
NSDate* since = @"2013-10-20T19:20:30+01:00"; // Optional filter by received after given date time (optional)
NSNumber* size = @20; // Optional page size in inbox emails list pagination (optional) (default to @20)
NSString* sort = @"ASC"; // Optional createdAt sort direction ASC or DESC (optional) (default to @"ASC")

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

// Get inbox emails paginated
[apiInstance getInboxEmailsPaginatedWithInboxId:inboxId
              before:before
              page:page
              since:since
              size:size
              sort:sort
          completionHandler: ^(OAIPageEmailPreview* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIInboxControllerApi->getInboxEmailsPaginated: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
inboxIdNSString*Id of inbox that emails belongs to
beforeNSDate*Optional filter by received before given date time[optional]
pageNSNumber*Optional page in inbox emails list pagination[optional] [default to @0]
sinceNSDate*Optional filter by received after given date time[optional]
sizeNSNumber*Optional page size in inbox emails list pagination[optional] [default to @20]
sortNSString*Optional createdAt sort direction ASC or DESC[optional] [default to @“ASC”]

Return type

OAIPageEmailPreview*

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 ]

getInboxSentEmails

-(NSURLSessionTask*) getInboxSentEmailsWithInboxId: (NSString*) inboxId
    before: (NSDate*) before
    page: (NSNumber*) page
    searchFilter: (NSString*) searchFilter
    since: (NSDate*) since
    size: (NSNumber*) size
    sort: (NSString*) sort
        completionHandler: (void (^)(OAIPageSentEmailProjection* output, NSError* error)) handler;

Get Inbox Sent Emails

Returns an inbox’s sent email receipts. Call individual sent email endpoints for more details. Note for privacy reasons the full body of sent emails is never stored. An MD5 hash hex is available for comparison instead.

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
NSDate* before = @"2013-10-20T19:20:30+01:00"; // Optional filter by sent before given date time (optional)
NSNumber* page = @0; // Optional page  in inbox sent email list pagination (optional) (default to @0)
NSString* searchFilter = @"searchFilter_example"; // Optional sent email search (optional)
NSDate* since = @"2013-10-20T19:20:30+01:00"; // Optional filter by sent after given date time (optional)
NSNumber* size = @20; // Optional page size in inbox sent email list pagination (optional) (default to @20)
NSString* sort = @"ASC"; // Optional createdAt sort direction ASC or DESC (optional) (default to @"ASC")

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

// Get Inbox Sent Emails
[apiInstance getInboxSentEmailsWithInboxId:inboxId
              before:before
              page:page
              searchFilter:searchFilter
              since:since
              size:size
              sort:sort
          completionHandler: ^(OAIPageSentEmailProjection* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIInboxControllerApi->getInboxSentEmails: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
inboxIdNSString*inboxId
beforeNSDate*Optional filter by sent before given date time[optional]
pageNSNumber*Optional page in inbox sent email list pagination[optional] [default to @0]
searchFilterNSString*Optional sent email search[optional]
sinceNSDate*Optional filter by sent after given date time[optional]
sizeNSNumber*Optional page size in inbox sent email list pagination[optional] [default to @20]
sortNSString*Optional createdAt sort direction ASC or DESC[optional] [default to @“ASC”]

Return type

OAIPageSentEmailProjection*

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 ]

getInboxTags

-(NSURLSessionTask*) getInboxTagsWithCompletionHandler: 
        (void (^)(NSArray<NSString*>* output, NSError* error)) handler;

Get inbox tags

Get all inbox tags

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"];



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

// Get inbox tags
[apiInstance getInboxTagsWithCompletionHandler: 
          ^(NSArray<NSString*>* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIInboxControllerApi->getInboxTags: %@", error);
                        }
                    }];

Parameters

This endpoint does not need any parameter.

Return type

NSArray<NSString>**

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 ]

getInboxes

-(NSURLSessionTask*) getInboxesWithBefore: (NSDate*) before
    since: (NSDate*) since
    size: (NSNumber*) size
    sort: (NSString*) sort
        completionHandler: (void (^)(NSArray<OAIInbox>* output, NSError* error)) handler;

List Inboxes and email addresses

List the inboxes you have created. Note use of the more advanced getAllEmails is recommended and allows paginated access using a limit and sort parameter.

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* before = @"2013-10-20T19:20:30+01:00"; // Optional filter by created before given date time (optional)
NSDate* since = @"2013-10-20T19:20:30+01:00"; // Optional filter by created after given date time (optional)
NSNumber* size = @100; // Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated `getAllEmails` for larger queries. (optional) (default to @100)
NSString* sort = @"ASC"; // Optional createdAt sort direction ASC or DESC (optional) (default to @"ASC")

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

// List Inboxes and email addresses
[apiInstance getInboxesWithBefore:before
              since:since
              size:size
              sort:sort
          completionHandler: ^(NSArray<OAIInbox>* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIInboxControllerApi->getInboxes: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
beforeNSDate*Optional filter by created before given date time[optional]
sinceNSDate*Optional filter by created after given date time[optional]
sizeNSNumber*Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated getAllEmails for larger queries.[optional] [default to @100]
sortNSString*Optional createdAt sort direction ASC or DESC[optional] [default to @“ASC”]

Return type

NSArray*

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 ]

getOrganizationInboxes

-(NSURLSessionTask*) getOrganizationInboxesWithBefore: (NSDate*) before
    page: (NSNumber*) page
    searchFilter: (NSString*) searchFilter
    since: (NSDate*) since
    size: (NSNumber*) size
    sort: (NSString*) sort
        completionHandler: (void (^)(OAIPageOrganizationInboxProjection* output, NSError* error)) handler;

List Organization Inboxes Paginated

List organization inboxes in paginated form. These are inboxes created with allowTeamAccess flag enabled. Organization inboxes are readOnly for non-admin users. The results are available on the content property of the returned object. This method allows for page (zero based), page size (how many results to return), and a sort direction (based on createdAt time).

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* before = @"2013-10-20T19:20:30+01:00"; // Optional filter by created before given date time (optional)
NSNumber* page = @0; // Optional page  in list pagination (optional) (default to @0)
NSString* searchFilter = @"searchFilter_example"; // Optional search filter (optional)
NSDate* since = @"2013-10-20T19:20:30+01:00"; // Optional filter by created after given date time (optional)
NSNumber* size = @20; // Optional page size in list pagination (optional) (default to @20)
NSString* sort = @"ASC"; // Optional createdAt sort direction ASC or DESC (optional) (default to @"ASC")

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

// List Organization Inboxes Paginated
[apiInstance getOrganizationInboxesWithBefore:before
              page:page
              searchFilter:searchFilter
              since:since
              size:size
              sort:sort
          completionHandler: ^(OAIPageOrganizationInboxProjection* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIInboxControllerApi->getOrganizationInboxes: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
beforeNSDate*Optional filter by created before given date time[optional]
pageNSNumber*Optional page in list pagination[optional] [default to @0]
searchFilterNSString*Optional search filter[optional]
sinceNSDate*Optional filter by created after given date time[optional]
sizeNSNumber*Optional page size in list pagination[optional] [default to @20]
sortNSString*Optional createdAt sort direction ASC or DESC[optional] [default to @“ASC”]

Return type

OAIPageOrganizationInboxProjection*

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 ]

listInboxRulesets

-(NSURLSessionTask*) listInboxRulesetsWithInboxId: (NSString*) inboxId
    before: (NSDate*) before
    page: (NSNumber*) page
    searchFilter: (NSString*) searchFilter
    since: (NSDate*) since
    size: (NSNumber*) size
    sort: (NSString*) sort
        completionHandler: (void (^)(OAIPageInboxRulesetDto* output, NSError* error)) handler;

List inbox rulesets

List all rulesets attached to an inbox

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
NSDate* before = @"2013-10-20T19:20:30+01:00"; // Optional filter by created before given date time (optional)
NSNumber* page = @0; // Optional page  in inbox ruleset list pagination (optional) (default to @0)
NSString* searchFilter = @"searchFilter_example"; // Optional search filter (optional)
NSDate* since = @"2013-10-20T19:20:30+01:00"; // Optional filter by created after given date time (optional)
NSNumber* size = @20; // Optional page size in inbox ruleset list pagination (optional) (default to @20)
NSString* sort = @"ASC"; // Optional createdAt sort direction ASC or DESC (optional) (default to @"ASC")

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

// List inbox rulesets
[apiInstance listInboxRulesetsWithInboxId:inboxId
              before:before
              page:page
              searchFilter:searchFilter
              since:since
              size:size
              sort:sort
          completionHandler: ^(OAIPageInboxRulesetDto* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIInboxControllerApi->listInboxRulesets: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
inboxIdNSString*inboxId
beforeNSDate*Optional filter by created before given date time[optional]
pageNSNumber*Optional page in inbox ruleset list pagination[optional] [default to @0]
searchFilterNSString*Optional search filter[optional]
sinceNSDate*Optional filter by created after given date time[optional]
sizeNSNumber*Optional page size in inbox ruleset list pagination[optional] [default to @20]
sortNSString*Optional createdAt sort direction ASC or DESC[optional] [default to @“ASC”]

Return type

OAIPageInboxRulesetDto*

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 ]

listInboxTrackingPixels

-(NSURLSessionTask*) listInboxTrackingPixelsWithInboxId: (NSString*) inboxId
    before: (NSDate*) before
    page: (NSNumber*) page
    searchFilter: (NSString*) searchFilter
    since: (NSDate*) since
    size: (NSNumber*) size
    sort: (NSString*) sort
        completionHandler: (void (^)(OAIPageTrackingPixelProjection* output, NSError* error)) handler;

List inbox tracking pixels

List all tracking pixels sent from an inbox

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
NSDate* before = @"2013-10-20T19:20:30+01:00"; // Optional filter by created before given date time (optional)
NSNumber* page = @0; // Optional page  in inbox tracking pixel list pagination (optional) (default to @0)
NSString* searchFilter = @"searchFilter_example"; // Optional search filter (optional)
NSDate* since = @"2013-10-20T19:20:30+01:00"; // Optional filter by created after given date time (optional)
NSNumber* size = @20; // Optional page size in inbox tracking pixel list pagination (optional) (default to @20)
NSString* sort = @"ASC"; // Optional createdAt sort direction ASC or DESC (optional) (default to @"ASC")

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

// List inbox tracking pixels
[apiInstance listInboxTrackingPixelsWithInboxId:inboxId
              before:before
              page:page
              searchFilter:searchFilter
              since:since
              size:size
              sort:sort
          completionHandler: ^(OAIPageTrackingPixelProjection* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIInboxControllerApi->listInboxTrackingPixels: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
inboxIdNSString*inboxId
beforeNSDate*Optional filter by created before given date time[optional]
pageNSNumber*Optional page in inbox tracking pixel list pagination[optional] [default to @0]
searchFilterNSString*Optional search filter[optional]
sinceNSDate*Optional filter by created after given date time[optional]
sizeNSNumber*Optional page size in inbox tracking pixel list pagination[optional] [default to @20]
sortNSString*Optional createdAt sort direction ASC or DESC[optional] [default to @“ASC”]

Return type

OAIPageTrackingPixelProjection*

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 ]

sendEmail

-(NSURLSessionTask*) sendEmailWithInboxId: (NSString*) inboxId
    sendEmailOptions: (OAISendEmailOptions*) sendEmailOptions
        completionHandler: (void (^)(NSError* error)) handler;

Send Email

Send an email from an inbox’s email address. The request body should contain the SendEmailOptions that include recipients, attachments, body etc. See SendEmailOptions for all available properties. Note the inboxId refers to the inbox’s id not the inbox’s email address. See https://www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method sendEmailAndConfirm.

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"; // ID of the inbox you want to send the email from
OAISendEmailOptions* sendEmailOptions = [[OAISendEmailOptions alloc] init]; // Options for the email (optional)

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

// Send Email
[apiInstance sendEmailWithInboxId:inboxId
              sendEmailOptions:sendEmailOptions
          completionHandler: ^(NSError* error) {
                        if (error) {
                            NSLog(@"Error calling OAIInboxControllerApi->sendEmail: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
inboxIdNSString*ID of the inbox you want to send the email from
sendEmailOptionsOAISendEmailOptions*Options for the email[optional]

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 ]

sendEmailAndConfirm

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

Send email and return sent confirmation

Sister method for standard sendEmail method with the benefit of returning a SentEmail entity confirming the successful sending of the email with a link to the sent object created for it.

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"; // ID of the inbox you want to send the email from
OAISendEmailOptions* sendEmailOptions = [[OAISendEmailOptions alloc] init]; // Options for the email (optional)

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

// Send email and return sent confirmation
[apiInstance sendEmailAndConfirmWithInboxId:inboxId
              sendEmailOptions:sendEmailOptions
          completionHandler: ^(OAISentEmailDto* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIInboxControllerApi->sendEmailAndConfirm: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
inboxIdNSString*ID of the inbox you want to send the email from
sendEmailOptionsOAISendEmailOptions*Options for the email[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 ]

sendTestEmail

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

Send a test email to inbox

Send an inbox a test email to test email receiving is working

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

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

// Send a test email to inbox
[apiInstance sendTestEmailWithInboxId:inboxId
          completionHandler: ^(NSError* error) {
                        if (error) {
                            NSLog(@"Error calling OAIInboxControllerApi->sendTestEmail: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
inboxIdNSString*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 ]

setInboxFavourited

-(NSURLSessionTask*) setInboxFavouritedWithInboxId: (NSString*) inboxId
    setInboxFavouritedOptions: (OAISetInboxFavouritedOptions*) setInboxFavouritedOptions
        completionHandler: (void (^)(OAIInbox* output, NSError* error)) handler;

Set inbox favourited state

Set and return new favourite state for an inbox

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
OAISetInboxFavouritedOptions* setInboxFavouritedOptions = [[OAISetInboxFavouritedOptions alloc] init]; // setInboxFavouritedOptions

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

// Set inbox favourited state
[apiInstance setInboxFavouritedWithInboxId:inboxId
              setInboxFavouritedOptions:setInboxFavouritedOptions
          completionHandler: ^(OAIInbox* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIInboxControllerApi->setInboxFavourited: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
inboxIdNSString*inboxId
setInboxFavouritedOptionsOAISetInboxFavouritedOptions*setInboxFavouritedOptions

Return type

OAIInbox*

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 ]

updateInbox

-(NSURLSessionTask*) updateInboxWithInboxId: (NSString*) inboxId
    updateInboxOptions: (OAIUpdateInboxOptions*) updateInboxOptions
        completionHandler: (void (^)(OAIInbox* output, NSError* error)) handler;

Update Inbox. Change name and description. Email address is not editable.

Update editable fields on an inbox

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
OAIUpdateInboxOptions* updateInboxOptions = [[OAIUpdateInboxOptions alloc] init]; // updateInboxOptions

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

// Update Inbox. Change name and description. Email address is not editable.
[apiInstance updateInboxWithInboxId:inboxId
              updateInboxOptions:updateInboxOptions
          completionHandler: ^(OAIInbox* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIInboxControllerApi->updateInbox: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
inboxIdNSString*inboxId
updateInboxOptionsOAIUpdateInboxOptions*updateInboxOptions

Return type

OAIInbox*

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 ]