DomainControllerAPI

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

    open class func addDomainWildcardCatchAll( _id: UUID) -> Promise<DomainDto>

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

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let _id = 987 // UUID | id

// Add catch all wild card inbox to domain
DomainControllerAPI.addDomainWildcardCatchAll(_id: _id).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

NameTypeDescriptionNotes
_idUUIDid

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

    open class func createDomain( domainOptions: CreateDomainOptions) -> Promise<DomainDto>

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

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let domainOptions = CreateDomainOptions(createdCatchAllInbox: false, _description: "_description_example", domain: "domain_example", domainType: "domainType_example") // CreateDomainOptions | domainOptions

// Create Domain
DomainControllerAPI.createDomain(domainOptions: domainOptions).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

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

    open class func deleteDomain( _id: UUID) -> Promise<[String]>

Delete a domain

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

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let _id = 987 // UUID | id

// Delete a domain
DomainControllerAPI.deleteDomain(_id: _id).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

NameTypeDescriptionNotes
_idUUIDid

Return type

[String]

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

    open class func getDomain( _id: UUID) -> Promise<DomainDto>

Get a domain

Returns domain verification status and tokens for a given domain

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let _id = 987 // UUID | id

// Get a domain
DomainControllerAPI.getDomain(_id: _id).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

NameTypeDescriptionNotes
_idUUIDid

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

    open class func getDomains() -> Promise<[DomainPreview]>

Get domains

List all custom domains you have created

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp


// Get domains
DomainControllerAPI.getDomains().then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

This endpoint does not need any parameter.

Return type

**[DomainPreview]**

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

    open class func updateDomain( _id: UUID,  updateDomainDto: UpdateDomainOptions) -> Promise<DomainDto>

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

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let _id = 987 // UUID | id
let updateDomainDto = UpdateDomainOptions(catchAllInboxId: 123) // UpdateDomainOptions | updateDomainDto

// Update a domain
DomainControllerAPI.updateDomain(_id: _id, updateDomainDto: updateDomainDto).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

NameTypeDescriptionNotes
_idUUIDid
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 ]