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

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 classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = DomainControllerApi()
val id : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | id
try {
    val result : DomainDto = apiInstance.addDomainWildcardCatchAll(id)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling DomainControllerApi#addDomainWildcardCatchAll")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling DomainControllerApi#addDomainWildcardCatchAll")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
idjava.util.UUIDid

Return type

DomainDto

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

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 classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = DomainControllerApi()
val domainOptions : CreateDomainOptions =  // CreateDomainOptions | domainOptions
try {
    val result : DomainDto = apiInstance.createDomain(domainOptions)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling DomainControllerApi#createDomain")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling DomainControllerApi#createDomain")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
domainOptionsCreateDomainOptionsdomainOptions

Return type

DomainDto

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

deleteDomain

kotlin.collections.List<kotlin.String> deleteDomain(id)

Delete a domain

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

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = DomainControllerApi()
val id : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | id
try {
    val result : kotlin.collections.List<kotlin.String> = apiInstance.deleteDomain(id)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling DomainControllerApi#deleteDomain")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling DomainControllerApi#deleteDomain")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
idjava.util.UUIDid

Return type

kotlin.collections.List<kotlin.String>

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

getDomain

DomainDto getDomain(id)

Get a domain

Returns domain verification status and tokens for a given domain

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = DomainControllerApi()
val id : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | id
try {
    val result : DomainDto = apiInstance.getDomain(id)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling DomainControllerApi#getDomain")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling DomainControllerApi#getDomain")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
idjava.util.UUIDid

Return type

DomainDto

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

getDomains

kotlin.collections.List getDomains()

Get domains

List all custom domains you have created

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = DomainControllerApi()
try {
    val result : kotlin.collections.List<DomainPreview> = apiInstance.getDomains()
    println(result)
} catch (e: ClientException) {
    println("4xx response calling DomainControllerApi#getDomains")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling DomainControllerApi#getDomains")
    e.printStackTrace()
}

Parameters

This endpoint does not need any parameter.

Return type

kotlin.collections.List

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

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 classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = DomainControllerApi()
val id : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | id
val updateDomainDto : UpdateDomainOptions =  // UpdateDomainOptions | updateDomainDto
try {
    val result : DomainDto = apiInstance.updateDomain(id, updateDomainDto)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling DomainControllerApi#updateDomain")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling DomainControllerApi#updateDomain")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
idjava.util.UUIDid
updateDomainDtoUpdateDomainOptionsupdateDomainDto

Return type

DomainDto

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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