DomainControllerAPI
All URIs are relative to https://api.mailslurp.com
Method | HTTP request | Description |
---|---|---|
addDomainWildcardCatchAll | POST /domains/{id}/wildcard | Add catch all wild card inbox to domain |
createDomain | POST /domains | Create Domain |
deleteDomain | DELETE /domains/{id} | Delete a domain |
getDomain | GET /domains/{id} | Get a domain |
getDomains | GET /domains | Get domains |
updateDomain | PUT /domains/{id} | Update a domain |
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 |
// 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
Name | Type | Description | Notes |
---|---|---|---|
_id | UUID |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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 createDomainOptions = CreateDomainOptions(domain: "domain_example", _description: "_description_example", createdCatchAllInbox: false, domainType: "domainType_example") // CreateDomainOptions |
// Create Domain
DomainControllerAPI.createDomain(createDomainOptions: createDomainOptions).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
Name | Type | Description | Notes |
---|---|---|---|
createDomainOptions | CreateDomainOptions |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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 |
// 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
Name | Type | Description | Notes |
---|---|---|---|
_id | UUID |
Return type
[String]
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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 |
// 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
Name | Type | Description | Notes |
---|---|---|---|
_id | UUID |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
open class func updateDomain( _id: UUID, updateDomainOptions: 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 |
let updateDomainOptions = UpdateDomainOptions(catchAllInboxId: 123) // UpdateDomainOptions |
// Update a domain
DomainControllerAPI.updateDomain(_id: _id, updateDomainOptions: updateDomainOptions).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
Name | Type | Description | Notes |
---|---|---|---|
_id | UUID | ||
updateDomainOptions | UpdateDomainOptions |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]