Skip to content

OAISentEmailsControllerApi

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

Method HTTP request Description
deleteAllSentEmails DELETE /sent Delete all sent email receipts
deleteSentEmail DELETE /sent/{id} Delete sent email receipt
getAllSentTrackingPixels GET /sent/tracking-pixels
getRawSentEmailContents GET /sent/{emailId}/raw Get raw sent email string. Returns unparsed raw SMTP message with headers and body.
getRawSentEmailJson GET /sent/{emailId}/raw/json Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format.
getSentEmail GET /sent/{id} Get sent email receipt
getSentEmailHTMLContent GET /sent/{id}/html Get sent email HTML content
getSentEmailPreviewURLs GET /sent/{id}/urls Get sent email URL for viewing in browser or downloading
getSentEmailTrackingPixels GET /sent/{id}/tracking-pixels
getSentEmails GET /sent Get all sent emails in paginated form
getSentOrganizationEmails GET /sent/organization
-(NSURLSessionTask*) deleteAllSentEmailsWithCompletionHandler: 
        (void (^)(NSError* error)) handler;

Delete all sent email receipts

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



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

// Delete all sent email receipts
[apiInstance deleteAllSentEmailsWithCompletionHandler: 
          ^(NSError* error) {
                        if (error) {
                            NSLog(@"Error calling OAISentEmailsControllerApi->deleteAllSentEmails: %@", 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 ]

-(NSURLSessionTask*) deleteSentEmailWithId: (NSString*) _id
        completionHandler: (void (^)(NSError* error)) handler;

Delete sent email receipt

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* _id = @"_id_example"; // 

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

// Delete sent email receipt
[apiInstance deleteSentEmailWithId:_id
          completionHandler: ^(NSError* error) {
                        if (error) {
                            NSLog(@"Error calling OAISentEmailsControllerApi->deleteSentEmail: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
_id NSString*

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 ]

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

Get all sent email tracking pixels in paginated form

Example

OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];

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


NSNumber* page = @0; // Optional page  in sent email tracking pixel list pagination (optional) (default to @0)
NSNumber* size = @20; // Optional page size in sent email tracking pixel list pagination (optional) (default to @20)
NSString* sort = @"ASC"; // Optional createdAt sort direction ASC or DESC (optional) (default to @"ASC")
NSString* searchFilter = @"searchFilter_example"; // Optional search filter (optional)
NSDate* since = @"2013-10-20T19:20:30+01:00"; // Filter by created at after the given timestamp (optional)
NSDate* before = @"2013-10-20T19:20:30+01:00"; // Filter by created at before the given timestamp (optional)

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

[apiInstance getAllSentTrackingPixelsWithPage:page
              size:size
              sort:sort
              searchFilter:searchFilter
              since:since
              before:before
          completionHandler: ^(OAIPageTrackingPixelProjection* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAISentEmailsControllerApi->getAllSentTrackingPixels: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
page NSNumber* Optional page in sent email tracking pixel list pagination [optional] [default to @0]
size NSNumber* Optional page size in sent email tracking pixel list pagination [optional] [default to @20]
sort NSString* Optional createdAt sort direction ASC or DESC [optional] [default to @"ASC"]
searchFilter NSString* Optional search filter [optional]
since NSDate* Filter by created at after the given timestamp [optional]
before NSDate* Filter by created at before the given timestamp [optional]

Return type

OAIPageTrackingPixelProjection*

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

-(NSURLSessionTask*) getRawSentEmailContentsWithEmailId: (NSString*) emailId
        completionHandler: (void (^)(NSString* output, NSError* error)) handler;

Get raw sent email string. Returns unparsed raw SMTP message with headers and body.

Returns a raw, unparsed, and unprocessed sent email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawSentEmailJson endpoint

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* emailId = @"emailId_example"; // ID of email

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

// Get raw sent email string. Returns unparsed raw SMTP message with headers and body.
[apiInstance getRawSentEmailContentsWithEmailId:emailId
          completionHandler: ^(NSString* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAISentEmailsControllerApi->getRawSentEmailContents: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
emailId NSString* ID of email

Return type

NSString*

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain

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

-(NSURLSessionTask*) getRawSentEmailJsonWithEmailId: (NSString*) emailId
        completionHandler: (void (^)(OAIRawEmailJson* output, NSError* error)) handler;

Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format.

Returns a raw, unparsed, and unprocessed sent email wrapped in a JSON response object for easier handling when compared with the getRawSentEmail text/plain response

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* emailId = @"emailId_example"; // ID of email

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

// Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format.
[apiInstance getRawSentEmailJsonWithEmailId:emailId
          completionHandler: ^(OAIRawEmailJson* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAISentEmailsControllerApi->getRawSentEmailJson: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
emailId NSString* ID of email

Return type

OAIRawEmailJson*

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

-(NSURLSessionTask*) getSentEmailWithId: (NSString*) _id
        completionHandler: (void (^)(OAISentEmailDto* output, NSError* error)) handler;

Get sent email receipt

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* _id = @"_id_example"; // 

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

// Get sent email receipt
[apiInstance getSentEmailWithId:_id
          completionHandler: ^(OAISentEmailDto* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAISentEmailsControllerApi->getSentEmail: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
_id NSString*

Return type

OAISentEmailDto*

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

-(NSURLSessionTask*) getSentEmailHTMLContentWithId: (NSString*) _id
        completionHandler: (void (^)(NSString* output, NSError* error)) handler;

Get sent email HTML content

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* _id = @"_id_example"; // 

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

// Get sent email HTML content
[apiInstance getSentEmailHTMLContentWithId:_id
          completionHandler: ^(NSString* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAISentEmailsControllerApi->getSentEmailHTMLContent: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
_id NSString*

Return type

NSString*

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/html

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

-(NSURLSessionTask*) getSentEmailPreviewURLsWithId: (NSString*) _id
        completionHandler: (void (^)(OAIEmailPreviewUrls* output, NSError* error)) handler;

Get sent email URL for viewing in browser or downloading

Get a list of URLs for sent email content as text/html or raw SMTP message for viewing the message in a browser.

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* _id = @"_id_example"; // 

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

// Get sent email URL for viewing in browser or downloading
[apiInstance getSentEmailPreviewURLsWithId:_id
          completionHandler: ^(OAIEmailPreviewUrls* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAISentEmailsControllerApi->getSentEmailPreviewURLs: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
_id NSString*

Return type

OAIEmailPreviewUrls*

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

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

Get all tracking pixels for a sent email in paginated form

Example

OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];

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


NSString* _id = @"_id_example"; // 
NSNumber* page = @0; // Optional page  in sent email tracking pixel list pagination (optional) (default to @0)
NSNumber* size = @20; // Optional page size in sent email tracking pixel list pagination (optional) (default to @20)
NSString* sort = @"ASC"; // Optional createdAt sort direction ASC or DESC (optional) (default to @"ASC")
NSString* searchFilter = @"searchFilter_example"; // Optional search filter (optional)
NSDate* since = @"2013-10-20T19:20:30+01:00"; // Filter by created at after the given timestamp (optional)
NSDate* before = @"2013-10-20T19:20:30+01:00"; // Filter by created at before the given timestamp (optional)

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

[apiInstance getSentEmailTrackingPixelsWithId:_id
              page:page
              size:size
              sort:sort
              searchFilter:searchFilter
              since:since
              before:before
          completionHandler: ^(OAIPageTrackingPixelProjection* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAISentEmailsControllerApi->getSentEmailTrackingPixels: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
_id NSString*
page NSNumber* Optional page in sent email tracking pixel list pagination [optional] [default to @0]
size NSNumber* Optional page size in sent email tracking pixel list pagination [optional] [default to @20]
sort NSString* Optional createdAt sort direction ASC or DESC [optional] [default to @"ASC"]
searchFilter NSString* Optional search filter [optional]
since NSDate* Filter by created at after the given timestamp [optional]
before NSDate* Filter by created at before the given timestamp [optional]

Return type

OAIPageTrackingPixelProjection*

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

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

Get all sent emails in paginated form

Example

OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];

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


NSString* inboxId = @"inboxId_example"; // Optional inboxId to filter sender of sent emails by (optional)
NSNumber* page = @0; // Optional page  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")
NSString* searchFilter = @"searchFilter_example"; // Optional search filter (optional)
NSDate* since = @"2013-10-20T19:20:30+01:00"; // Filter by created at after the given timestamp (optional)
NSDate* before = @"2013-10-20T19:20:30+01:00"; // Filter by created at before the given timestamp (optional)

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

// Get all sent emails in paginated form
[apiInstance getSentEmailsWithInboxId:inboxId
              page:page
              size:size
              sort:sort
              searchFilter:searchFilter
              since:since
              before:before
          completionHandler: ^(OAIPageSentEmailProjection* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAISentEmailsControllerApi->getSentEmails: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
inboxId NSString* Optional inboxId to filter sender of sent emails by [optional]
page NSNumber* Optional page 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"]
searchFilter NSString* Optional search filter [optional]
since NSDate* Filter by created at after the given timestamp [optional]
before NSDate* Filter by created at before the given timestamp [optional]

Return type

OAIPageSentEmailProjection*

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

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

Get all sent organization emails in paginated form

Example

OAIDefaultConfiguration *apiConfig = [OAIDefaultConfiguration sharedConfig];

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


NSString* inboxId = @"inboxId_example"; // Optional inboxId to filter sender of sent emails by (optional)
NSNumber* page = @0; // Optional page  in sent email list pagination (optional) (default to @0)
NSNumber* size = @20; // Optional page size in sent email list pagination (optional) (default to @20)
NSString* sort = @"ASC"; // Optional createdAt sort direction ASC or DESC (optional) (default to @"ASC")
NSString* searchFilter = @"searchFilter_example"; // Optional search filter (optional)
NSDate* since = @"2013-10-20T19:20:30+01:00"; // Filter by created at after the given timestamp (optional)
NSDate* before = @"2013-10-20T19:20:30+01:00"; // Filter by created at before the given timestamp (optional)

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

[apiInstance getSentOrganizationEmailsWithInboxId:inboxId
              page:page
              size:size
              sort:sort
              searchFilter:searchFilter
              since:since
              before:before
          completionHandler: ^(OAIPageSentEmailProjection* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAISentEmailsControllerApi->getSentOrganizationEmails: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
inboxId NSString* Optional inboxId to filter sender of sent emails by [optional]
page NSNumber* Optional page in sent email list pagination [optional] [default to @0]
size NSNumber* Optional page size in sent email list pagination [optional] [default to @20]
sort NSString* Optional createdAt sort direction ASC or DESC [optional] [default to @"ASC"]
searchFilter NSString* Optional search filter [optional]
since NSDate* Filter by created at after the given timestamp [optional]
before NSDate* Filter by created at before the given timestamp [optional]

Return type

OAIPageSentEmailProjection*

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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