maislurp-client-powershell.maislurp-client-powershell/Api.DomainControllerApi

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

MethodHTTP requestDescription
Add-DomainWildcardCatchAllPOST /domains/{id}/wildcardAdd catch all wild card inbox to domain
New-DomainPOST /domainsCreate Domain
Invoke-DeleteDomainDELETE /domains/{id}Delete a domain
Get-DomainGET /domains/{id}Get a domain
Get-DomainsGET /domainsGet domains
Update-DomainPUT /domains/{id}Update a domain

Add-DomainWildcardCatchAll

DomainDto Add-DomainWildcardCatchAll         [-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

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: API_KEY
$Configuration.ApiKey.x-api-key = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.x-api-key = "Bearer"

$Id = "Id_example" # String | id

# Add catch all wild card inbox to domain
try {
     $Result = Add-DomainWildcardCatchAll -Id $Id
} catch {
    Write-Host ("Exception occured when calling Add-DomainWildcardCatchAll: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

NameTypeDescriptionNotes
IdStringid

Return type

DomainDto (PSCustomObject)

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 ]

New-Domain

DomainDto New-Domain         [-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

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: API_KEY
$Configuration.ApiKey.x-api-key = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.x-api-key = "Bearer"

$DomainOptions = (Initialize-CreateDomainOptions -CreatedCatchAllInbox $false -Description "Description_example" -Domain "Domain_example" -DomainType "HTTP_INBOX") # CreateDomainOptions | domainOptions

# Create Domain
try {
     $Result = New-Domain -DomainOptions $DomainOptions
} catch {
    Write-Host ("Exception occured when calling New-Domain: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

NameTypeDescriptionNotes
DomainOptionsCreateDomainOptionsdomainOptions

Return type

DomainDto (PSCustomObject)

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 ]

Invoke-DeleteDomain

String[] Invoke-DeleteDomain         [-Id]

Delete a domain

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

Example

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: API_KEY
$Configuration.ApiKey.x-api-key = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.x-api-key = "Bearer"

$Id = "Id_example" # String | id

# Delete a domain
try {
     $Result = Invoke-DeleteDomain -Id $Id
} catch {
    Write-Host ("Exception occured when calling Invoke-DeleteDomain: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

NameTypeDescriptionNotes
IdStringid

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 ]

Get-Domain

DomainDto Get-Domain         [-Id]

Get a domain

Returns domain verification status and tokens for a given domain

Example

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: API_KEY
$Configuration.ApiKey.x-api-key = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.x-api-key = "Bearer"

$Id = "Id_example" # String | id

# Get a domain
try {
     $Result = Get-Domain -Id $Id
} catch {
    Write-Host ("Exception occured when calling Get-Domain: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

NameTypeDescriptionNotes
IdStringid

Return type

DomainDto (PSCustomObject)

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 ]

Get-Domains

DomainPreview[] Get-Domains

Get domains

List all custom domains you have created

Example

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: API_KEY
$Configuration.ApiKey.x-api-key = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.x-api-key = "Bearer"


# Get domains
try {
     $Result = Get-Domains
} catch {
    Write-Host ("Exception occured when calling Get-Domains: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

This endpoint does not need any parameter.

Return type

**DomainPreview[]** (PSCustomObject)

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 ]

Update-Domain

DomainDto Update-Domain         [-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

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure API key authorization: API_KEY
$Configuration.ApiKey.x-api-key = "YOUR_API_KEY"
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$Configuration.ApiKeyPrefix.x-api-key = "Bearer"

$Id = "Id_example" # String | id
$UpdateDomainDto = (Initialize-UpdateDomainOptions -CatchAllInboxId "CatchAllInboxId_example") # UpdateDomainOptions | updateDomainDto

# Update a domain
try {
     $Result = Update-Domain -Id $Id -UpdateDomainDto $UpdateDomainDto
} catch {
    Write-Host ("Exception occured when calling Update-Domain: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

NameTypeDescriptionNotes
IdStringid
UpdateDomainDtoUpdateDomainOptionsupdateDomainDto

Return type

DomainDto (PSCustomObject)

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 ]