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

MethodHTTP requestDescription
addDomainWildcardCatchAllPOST /domains/{id}/wildcardAdd catch all wild card inbox to domain
createDomainPOST /domainsCreate Domain
deleteDomainDELETE /domains/{id}Delete a domain
getDomainGET /domains/{id}Get a domain
getDomainsGET /domainsGet domains
updateDomainPUT /domains/{id}Update a domain
-(NSURLSessionTask*) addDomainWildcardCatchAllWithId: (NSString*) _id
        completionHandler: (void (^)(OAIDomainDto* output, NSError* error)) handler;

Add catch all wild card inbox to domain

Add a catch all inbox to a domain so that any emails sent to it that cannot be matched will be sent to the catch all inbox generated

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

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

// Add catch all wild card inbox to domain
[apiInstance addDomainWildcardCatchAllWithId:_id
          completionHandler: ^(OAIDomainDto* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIDomainControllerApi->addDomainWildcardCatchAll: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
_idNSString*

Return type

OAIDomainDto*

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*) createDomainWithCreateDomainOptions: (OAICreateDomainOptions*) createDomainOptions
        completionHandler: (void (^)(OAIDomainDto* output, NSError* error)) handler;

Create Domain

Link a domain that you own with MailSlurp so you can create email addresses using it. Endpoint returns DNS records used for validation. You must add these verification records to your host provider’s DNS setup to verify the domain.

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


OAICreateDomainOptions* createDomainOptions = [[OAICreateDomainOptions alloc] init]; // 

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

// Create Domain
[apiInstance createDomainWithCreateDomainOptions:createDomainOptions
          completionHandler: ^(OAIDomainDto* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIDomainControllerApi->createDomain: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
createDomainOptionsOAICreateDomainOptions*

Return type

OAIDomainDto*

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: /

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

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

Delete a domain

Delete a domain. This will disable any existing inboxes that use this domain.

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

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

// Delete a domain
[apiInstance deleteDomainWithId:_id
          completionHandler: ^(NSArray<NSString*>* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIDomainControllerApi->deleteDomain: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
_idNSString*

Return type

NSArray<NSString>**

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*) getDomainWithId: (NSString*) _id
        completionHandler: (void (^)(OAIDomainDto* output, NSError* error)) handler;

Get a domain

Returns domain verification status and tokens for a given domain

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

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

// Get a domain
[apiInstance getDomainWithId:_id
          completionHandler: ^(OAIDomainDto* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIDomainControllerApi->getDomain: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
_idNSString*

Return type

OAIDomainDto*

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*) getDomainsWithCompletionHandler: 
        (void (^)(NSArray<OAIDomainPreview>* output, NSError* error)) handler;

Get domains

List all custom domains you have created

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



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

// Get domains
[apiInstance getDomainsWithCompletionHandler: 
          ^(NSArray<OAIDomainPreview>* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIDomainControllerApi->getDomains: %@", error);
                        }
                    }];

Parameters

This endpoint does not need any parameter.

Return type

NSArray*

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*) updateDomainWithId: (NSString*) _id
    updateDomainOptions: (OAIUpdateDomainOptions*) updateDomainOptions
        completionHandler: (void (^)(OAIDomainDto* output, NSError* error)) handler;

Update a domain

Update values on a domain. Note you cannot change the domain name as it is immutable. Recreate the domain if you need to alter this.

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"; // 
OAIUpdateDomainOptions* updateDomainOptions = [[OAIUpdateDomainOptions alloc] init]; // 

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

// Update a domain
[apiInstance updateDomainWithId:_id
              updateDomainOptions:updateDomainOptions
          completionHandler: ^(OAIDomainDto* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIDomainControllerApi->updateDomain: %@", error);
                        }
                    }];

Parameters

NameTypeDescriptionNotes
_idNSString*
updateDomainOptionsOAIUpdateDomainOptions*

Return type

OAIDomainDto*

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: /

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