mailslurp.api.DomainControllerApi

Load the API package

import 'package:mailslurp/api.dart';

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

addDomainWildcardCatchAll

DomainDto addDomainWildcardCatchAll(id)

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

import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';

final api_instance = DomainControllerApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | id

try { 
    final result = api_instance.addDomainWildcardCatchAll(id);
    print(result);
} catch (e) {
    print('Exception when calling DomainControllerApi->addDomainWildcardCatchAll: $en');
}

Parameters

NameTypeDescriptionNotes
idStringid

Return type

DomainDto

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 ]

createDomain

DomainDto createDomain(domainOptions)

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

import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';

final api_instance = DomainControllerApi();
final domainOptions = CreateDomainOptions(); // CreateDomainOptions | domainOptions

try { 
    final result = api_instance.createDomain(domainOptions);
    print(result);
} catch (e) {
    print('Exception when calling DomainControllerApi->createDomain: $en');
}

Parameters

NameTypeDescriptionNotes
domainOptionsCreateDomainOptionsdomainOptions

Return type

DomainDto

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 ]

deleteDomain

List deleteDomain(id)

Delete a domain

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

Example

import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';

final api_instance = DomainControllerApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | id

try { 
    final result = api_instance.deleteDomain(id);
    print(result);
} catch (e) {
    print('Exception when calling DomainControllerApi->deleteDomain: $en');
}

Parameters

NameTypeDescriptionNotes
idStringid

Return type

List

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 ]

getDomain

DomainDto getDomain(id)

Get a domain

Returns domain verification status and tokens for a given domain

Example

import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';

final api_instance = DomainControllerApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | id

try { 
    final result = api_instance.getDomain(id);
    print(result);
} catch (e) {
    print('Exception when calling DomainControllerApi->getDomain: $en');
}

Parameters

NameTypeDescriptionNotes
idStringid

Return type

DomainDto

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 ]

getDomains

List getDomains()

Get domains

List all custom domains you have created

Example

import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';

final api_instance = DomainControllerApi();

try { 
    final result = api_instance.getDomains();
    print(result);
} catch (e) {
    print('Exception when calling DomainControllerApi->getDomains: $en');
}

Parameters

This endpoint does not need any parameter.

Return type

List

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 ]

updateDomain

DomainDto updateDomain(id, updateDomainDto)

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

import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';

final api_instance = DomainControllerApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | id
final updateDomainDto = UpdateDomainOptions(); // UpdateDomainOptions | updateDomainDto

try { 
    final result = api_instance.updateDomain(id, updateDomainDto);
    print(result);
} catch (e) {
    print('Exception when calling DomainControllerApi->updateDomain: $en');
}

Parameters

NameTypeDescriptionNotes
idStringid
updateDomainDtoUpdateDomainOptionsupdateDomainDto

Return type

DomainDto

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 ]