maislurp-client-powershell.maislurp-client-powershell/Api.DomainControllerApi
All URIs are relative to https://api.mailslurp.com
Method | HTTP request | Description |
---|---|---|
Add-DomainWildcardCatchAll | POST /domains/{id}/wildcard | Add catch all wild card inbox to domain |
New-Domain | POST /domains | Create Domain |
Invoke-DeleteDomain | DELETE /domains/{id} | Delete a domain |
Get-Domain | GET /domains/{id} | Get a domain |
Get-Domains | GET /domains | Get domains |
Update-Domain | PUT /domains/{id} | Update a domain |
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 |
# 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
Name | Type | Description | Notes |
---|---|---|---|
Id | String |
Return type
DomainDto (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
DomainDto New-Domain
[-CreateDomainOptions]
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"
$CreateDomainOptions = (Initialize-CreateDomainOptions -Domain "Domain_example" -Description "Description_example" -CreatedCatchAllInbox $false -DomainType "HTTP_INBOX") # CreateDomainOptions |
# Create Domain
try {
$Result = New-Domain -CreateDomainOptions $CreateDomainOptions
} 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
Name | Type | Description | Notes |
---|---|---|---|
CreateDomainOptions | CreateDomainOptions |
Return type
DomainDto (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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 |
# 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
Name | Type | Description | Notes |
---|---|---|---|
Id | String |
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 ]
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 |
# 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
Name | Type | Description | Notes |
---|---|---|---|
Id | String |
Return type
DomainDto (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
DomainDto Update-Domain
[-Id]
[-UpdateDomainOptions]
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 |
$UpdateDomainOptions = (Initialize-UpdateDomainOptions -CatchAllInboxId "CatchAllInboxId_example") # UpdateDomainOptions |
# Update a domain
try {
$Result = Update-Domain -Id $Id -UpdateDomainOptions $UpdateDomainOptions
} 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
Name | Type | Description | Notes |
---|---|---|---|
Id | String | ||
UpdateDomainOptions | UpdateDomainOptions |
Return type
DomainDto (PSCustomObject)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]