# OAIInboxControllerApi
All URIs are relative to https://api.mailslurp.com
Method | HTTP request | Description |
---|---|---|
createInbox | POST /inboxes | Create an Inbox (email address) |
createInboxWithOptions | POST /inboxes/withOptions | Create an inbox with additional options |
deleteAllInboxes | DELETE /inboxes | Delete all inboxes |
deleteInbox | DELETE /inboxes/{inboxId} | Delete inbox |
getAllInboxes | GET /inboxes/paginated | List All Inboxes Paginated |
getEmails | GET /inboxes/{inboxId}/emails | 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. |
getInbox | GET /inboxes/{inboxId} | Get Inbox |
getInboxEmailsPaginated | GET /inboxes/{inboxId}/emails/paginated | Get inbox emails paginated |
getInboxSentEmails | GET /inboxes/{inboxId}/sent | Get Inbox Sent Emails |
getInboxTags | GET /inboxes/tags | Get inbox tags |
getInboxes | GET /inboxes | List Inboxes / Email Addresses |
sendEmail | POST /inboxes/{inboxId} | Send Email |
sendEmailAndConfirm | POST /inboxes/{inboxId}/confirm | Send email and return sent confirmation |
setInboxFavourited | PUT /inboxes/{inboxId}/favourite | Set inbox favourited state |
updateInbox | PATCH /inboxes/{inboxId} | Update Inbox |
# createInbox
-(NSURLSessionTask*) createInboxWithDescription: (NSString*) _description
emailAddress: (NSString*) emailAddress
expiresAt: (NSDate*) expiresAt
expiresIn: (NSNumber*) expiresIn
favourite: (NSNumber*) favourite
name: (NSString*) name
tags: (List<NSString*>*) tags
useDomainPool: (NSNumber*) useDomainPool
completionHandler: (void (^)(OAIInbox* output, NSError* error)) handler;
Create an Inbox (email address)
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"];
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. 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 favorited. Favouriting inboxes is typically done in the dashboard for quick access or filtering (optional)
NSString* name = @"name_example"; // Optional name of the inbox. Displayed in the dashboard for easier search (optional)
List<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. (optional)
OAIInboxControllerApi*apiInstance = [[OAIInboxControllerApi alloc] init];
// Create an Inbox (email address)
[apiInstance createInboxWithDescription:_description
emailAddress:emailAddress
expiresAt:expiresAt
expiresIn:expiresIn
favourite:favourite
name:name
tags:tags
useDomainPool:useDomainPool
completionHandler: ^(OAIInbox* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIInboxControllerApi->createInbox: %@", error);
}
}];
# Parameters
Name | Type | Description | Notes |
---|---|---|---|
_description | NSString* | Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with | [optional] |
emailAddress | NSString* | 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. 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] |
expiresAt | NSDate* | 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] |
expiresIn | NSNumber* | Number of milliseconds that inbox should exist for | [optional] |
favourite | NSNumber* | Is the inbox favorited. Favouriting inboxes is typically done in the dashboard for quick access or filtering | [optional] |
name | NSString* | Optional name of the inbox. Displayed in the dashboard for easier search | [optional] |
tags | *NSArray<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] |
useDomainPool | NSNumber* | 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. | [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]
# createInboxWithOptions
-(NSURLSessionTask*) createInboxWithOptionsWithCreateInboxDto: (OAICreateInboxDto*) createInboxDto
completionHandler: (void (^)(OAIInbox* output, NSError* error)) handler;
Create an inbox with additional options
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 additional options
[apiInstance createInboxWithOptionsWithCreateInboxDto:createInboxDto
completionHandler: ^(OAIInbox* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIInboxControllerApi->createInboxWithOptions: %@", error);
}
}];
# Parameters
Name | Type | Description | Notes |
---|---|---|---|
createInboxDto | OAICreateInboxDto* | createInboxDto |
# Return type
# Authorization
# HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
# 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
# HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
# 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
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]
# getAllInboxes
-(NSURLSessionTask*) getAllInboxesWithFavourite: (NSNumber*) favourite
page: (NSNumber*) page
search: (NSString*) search
size: (NSNumber*) size
sort: (NSString*) sort
tag: (NSString*) tag
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 index (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"];
NSNumber* favourite = @(NO); // Optionally filter results for favourites only (optional) (default to @(NO))
NSNumber* page = @0; // Optional page index in inbox list pagination (optional) (default to @0)
NSString* search = @"search_example"; // Optionally filter by search words partial matching ID, tags, name, and email address (optional)
NSNumber* size = @20; // Optional page size in inbox 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 (optional)
OAIInboxControllerApi*apiInstance = [[OAIInboxControllerApi alloc] init];
// List All Inboxes Paginated
[apiInstance getAllInboxesWithFavourite:favourite
page:page
search:search
size:size
sort:sort
tag:tag
completionHandler: ^(OAIPageInboxProjection* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIInboxControllerApi->getAllInboxes: %@", error);
}
}];
# Parameters
Name | Type | Description | Notes |
---|---|---|---|
favourite | NSNumber* | Optionally filter results for favourites only | [optional] [default to @(NO)] |
page | NSNumber* | Optional page index in inbox list pagination | [optional] [default to @0] |
search | NSString* | Optionally filter by search words partial matching ID, tags, name, and email address | [optional] |
size | NSNumber* | Optional page size in inbox list pagination | [optional] [default to @20] |
sort | NSString* | Optional createdAt sort direction ASC or DESC | [optional] [default to @"ASC"] |
tag | NSString* | Optionally filter by tags | [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]
# getEmails
-(NSURLSessionTask*) getEmailsWithInboxId: (NSString*) inboxId
limit: (NSNumber*) limit
minCount: (NSNumber*) minCount
retryTimeout: (NSNumber*) retryTimeout
since: (NSDate*) since
size: (NSNumber*) size
sort: (NSString*) sort
completionHandler: (void (^)(List<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
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)
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
limit:limit
minCount:minCount
retryTimeout:retryTimeout
since:since
size:size
sort:sort
completionHandler: ^(List<OAIEmailPreview>* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIInboxControllerApi->getEmails: %@", error);
}
}];
# Parameters
Name | Type | Description | Notes |
---|---|---|---|
inboxId | NSString* | Id of inbox that emails belongs to | |
limit | NSNumber* | Limit the result set, ordered by received date time sort direction. Maximum 100. For more listing options see the email controller | [optional] |
minCount | NSNumber* | Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached. | [optional] |
retryTimeout | NSNumber* | Maximum milliseconds to spend retrying inbox database until minCount emails are returned | [optional] |
since | NSDate* | Exclude emails received before this ISO 8601 date time | [optional] |
size | NSNumber* | Alias for limit. Assessed first before assessing any passed limit. | [optional] |
sort | NSString* | Sort the results by received date and direction ASC or DESC | [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]
# getInbox
-(NSURLSessionTask*) getInboxWithInboxId: (NSString*) inboxId
completionHandler: (void (^)(OAIInbox* output, NSError* error)) handler;
Get 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
[apiInstance getInboxWithInboxId:inboxId
completionHandler: ^(OAIInbox* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIInboxControllerApi->getInbox: %@", error);
}
}];
# Parameters
Name | Type | Description | Notes |
---|---|---|---|
inboxId | NSString* | inboxId |
# 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]
# getInboxEmailsPaginated
-(NSURLSessionTask*) getInboxEmailsPaginatedWithInboxId: (NSString*) inboxId
page: (NSNumber*) page
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
NSNumber* page = @0; // Optional page index in inbox emails list pagination (optional) (default to @0)
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
page:page
size:size
sort:sort
completionHandler: ^(OAIPageEmailPreview* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIInboxControllerApi->getInboxEmailsPaginated: %@", error);
}
}];
# Parameters
Name | Type | Description | Notes |
---|---|---|---|
inboxId | NSString* | Id of inbox that emails belongs to | |
page | NSNumber* | Optional page index in inbox emails list pagination | [optional] [default to @0] |
size | NSNumber* | Optional page size in inbox emails list pagination | [optional] [default to @20] |
sort | NSString* | Optional createdAt sort direction ASC or DESC | [optional] [default to @"ASC"] |
# 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]
# getInboxSentEmails
-(NSURLSessionTask*) getInboxSentEmailsWithInboxId: (NSString*) inboxId
page: (NSNumber*) page
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
NSNumber* page = @0; // Optional page index in inbox sent email list pagination (optional) (default to @0)
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
page:page
size:size
sort:sort
completionHandler: ^(OAIPageSentEmailProjection* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIInboxControllerApi->getInboxSentEmails: %@", error);
}
}];
# Parameters
Name | Type | Description | Notes |
---|---|---|---|
inboxId | NSString* | inboxId | |
page | NSNumber* | Optional page index in inbox sent email list pagination | [optional] [default to @0] |
size | NSNumber* | Optional page size in inbox sent email list pagination | [optional] [default to @20] |
sort | NSString* | Optional createdAt sort direction ASC or DESC | [optional] [default to @"ASC"] |
# 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]
# getInboxTags
-(NSURLSessionTask*) getInboxTagsWithCompletionHandler:
(void (^)(List<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:
^(List<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
# HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
# getInboxes
-(NSURLSessionTask*) getInboxesWithSize: (NSNumber*) size
sort: (NSString*) sort
completionHandler: (void (^)(List<OAIInbox>* output, NSError* error)) handler;
List Inboxes / Email Addresses
List the inboxes you have created. Note use of the more advanced getAllEmails
is recommended. You can provide 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"];
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 / Email Addresses
[apiInstance getInboxesWithSize:size
sort:sort
completionHandler: ^(List<OAIInbox>* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIInboxControllerApi->getInboxes: %@", error);
}
}];
# Parameters
Name | Type | Description | Notes |
---|---|---|---|
size | NSNumber* | Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated `getAllEmails` for larger queries. | [optional] [default to @100] |
sort | NSString* | Optional createdAt sort direction ASC or DESC | [optional] [default to @"ASC"] |
# 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]
# 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
Name | Type | Description | Notes |
---|---|---|---|
inboxId | NSString* | ID of the inbox you want to send the email from | |
sendEmailOptions | OAISendEmailOptions* | Options for the email | [optional] |
# 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]
# 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 link the 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
Name | Type | Description | Notes |
---|---|---|---|
inboxId | NSString* | ID of the inbox you want to send the email from | |
sendEmailOptions | OAISendEmailOptions* | Options for the email | [optional] |
# Return type
# Authorization
# HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
# 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
Name | Type | Description | Notes |
---|---|---|---|
inboxId | NSString* | inboxId | |
setInboxFavouritedOptions | OAISetInboxFavouritedOptions* | setInboxFavouritedOptions |
# Return type
# Authorization
# HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
# updateInbox
-(NSURLSessionTask*) updateInboxWithInboxId: (NSString*) inboxId
updateInboxOptions: (OAIUpdateInboxOptions*) updateInboxOptions
completionHandler: (void (^)(OAIInbox* output, NSError* error)) handler;
Update Inbox
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
[apiInstance updateInboxWithInboxId:inboxId
updateInboxOptions:updateInboxOptions
completionHandler: ^(OAIInbox* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling OAIInboxControllerApi->updateInbox: %@", error);
}
}];
# Parameters
Name | Type | Description | Notes |
---|---|---|---|
inboxId | NSString* | inboxId | |
updateInboxOptions | OAIUpdateInboxOptions* | updateInboxOptions |
# Return type
# Authorization
# HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]