iOS Documentation

Send and receive emails from iOS applications. Create test email accounts with ObjectiveC email SDK.


For documentation see developer guide. Create an account in the MailSlurp Dashboard to view your API Key. For all bugs, feature requests, or help please see support.

This ObjC package is automatically generated by the OpenAPI Generator project:

  • API version: 0.0.1-alpha
  • Package version:
  • Build package: org.openapitools.codegen.languages.ObjcClientCodegen For more information, please visit


The SDK requires ARC (Automatic Reference Counting) to be enabled in the Xcode project.

Installation & Usage

Install from Github using CocoaPods

Add the following to the Podfile:

pod 'MailSlurp', :git => ''

To specify a particular branch, append , :branch => 'branch-name-here'

To specify a particular commit, append , :commit => '11aa22'

Install from local path using CocoaPods

Put the SDK under your project folder (e.g. /path/to/objc_project/Vendor/MailSlurp) and then add the following to the Podfile:

pod 'MailSlurp', :path => 'Vendor/MailSlurp'


Import the following:

// load models
// load API classes for accessing endpoints


It's recommended to create an instance of ApiClient per thread in a multi-threaded environment to avoid any potential issues.

Getting Started

Please follow the installation procedure and then run the following:

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

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

// Create new email address
[apiInstance createNewEmailAddressWithCompletionHandler: 
              ^(OAIInbox* output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            if (error) {
                                NSLog(@"Error: %@", error);

Documentation for API Endpoints

All URIs are relative to

Class Method HTTP request Description
OAICommonOperationsApi createNewEmailAddress POST /newEmailAddress Create new email address
OAICommonOperationsApi deleteEmail DELETE /deleteEmail Delete an email
OAICommonOperationsApi deleteEmailAddress DELETE /deleteEmailAddress Delete email address and its emails
OAICommonOperationsApi emptyInbox DELETE /emptyInbox Delete all emails in an inbox
OAICommonOperationsApi sendEmailSimple POST /sendEmail Send an email from a random email address
OAICommonOperationsApi waitForEmailCount GET /waitForEmailCount Wait for and return count number of emails
OAICommonOperationsApi waitForLatestEmail GET /waitForLatestEmail Fetch inbox's latest email or if empty wait for email to arrive
OAICommonOperationsApi waitForMatchingEmail POST /waitForMatchingEmails Wait or return list of emails that match simple matching patterns
OAICommonOperationsApi waitForNthEmail GET /waitForNthEmail Wait for or fetch the email with a given index in the inbox specified
OAIExtraOperationsApi bulkCreateInboxes POST /bulk/inboxes Bulk create Inboxes (email addresses)
OAIExtraOperationsApi bulkDeleteInboxes DELETE /bulk/inboxes Bulk Delete Inboxes
OAIExtraOperationsApi bulkSendEmails POST /bulk/send Bulk Send Emails
OAIExtraOperationsApi createDomain POST /domains Create Domain
OAIExtraOperationsApi createInbox POST /inboxes Create an Inbox (email address)
OAIExtraOperationsApi createWebhook POST /inboxes/{inboxId}/webhooks Attach a WebHook URL to an inbox
OAIExtraOperationsApi deleteDomain DELETE /domains/{id} Delete a domain
OAIExtraOperationsApi deleteEmail1 DELETE /emails/{emailId} Delete Email
OAIExtraOperationsApi deleteInbox DELETE /inboxes/{inboxId} Delete Inbox / Email Address
OAIExtraOperationsApi deleteWebhook DELETE /inboxes/{inboxId}/webhooks/{webhookId} Delete and disable a WebHook for an Inbox
OAIExtraOperationsApi downloadAttachment GET /emails/{emailId}/attachments/{attachmentId} Get email attachment
OAIExtraOperationsApi forwardEmail POST /emails/{emailId}/forward Forward Email
OAIExtraOperationsApi getDomain GET /domains/{id} Get a domain
OAIExtraOperationsApi getDomains GET /domains Get domains
OAIExtraOperationsApi getEmail GET /emails/{emailId} Get Email Content
OAIExtraOperationsApi getEmails GET /inboxes/{inboxId}/emails List Emails in an Inbox / EmailAddress
OAIExtraOperationsApi getEmailsPaginated GET /emails Get all emails
OAIExtraOperationsApi getInbox GET /inboxes/{inboxId} Get Inbox / EmailAddress
OAIExtraOperationsApi getInboxes GET /inboxes List Inboxes / Email Addresses
OAIExtraOperationsApi getRawEmailContents GET /emails/{emailId}/raw Get Raw Email Content
OAIExtraOperationsApi getWebhooks GET /inboxes/{inboxId}/webhooks Get all WebHooks for an Inbox
OAIExtraOperationsApi sendEmail POST /inboxes/{inboxId} Send Email
OAIExtraOperationsApi uploadAttachment POST /attachments Upload an attachment for sending
OAIExtraOperationsApi uploadMultipartForm POST /attachments/multipart Upload an attachment for sending using Multipart Form

Documentation For Models

Documentation For Authorization


  • Type: API key
  • API key parameter name: x-api-key
  • Location: HTTP header