Skip to content

maislurp-client-powershell.maislurp-client-powershell/Api.CommonActionsControllerApi

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

Method HTTP request Description
New-NewEmailAddress POST /newEmailAddress Create new random inbox
New-RandomInbox POST /createInbox Create new random inbox
Invoke-DeleteEmailAddress DELETE /deleteEmailAddress Delete inbox email address by inbox id
Invoke-EmptyInbox DELETE /emptyInbox Delete all emails in an inbox
Send-EmailSimple POST /sendEmail Send an email

InboxDto New-NewEmailAddress
        [-AllowTeamAccess]
        [-UseDomainPool]
        [-ExpiresAt]
        [-ExpiresIn]
        [-EmailAddress]
        [-InboxType]
        [-Description]
        [-Name]
        [-Tags]
        [-Favourite]
        [-VirtualInbox]

Create new random inbox

Returns an Inbox with an id and an emailAddress

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"

$AllowTeamAccess = true # Boolean |  (optional)
$UseDomainPool = true # Boolean |  (optional)
$ExpiresAt = Get-Date # System.DateTime |  (optional)
$ExpiresIn = 987 # Int64 |  (optional)
$EmailAddress = "EmailAddress_example" # String |  (optional)
$InboxType = "HTTP_INBOX" # String |  (optional)
$Description = "Description_example" # String |  (optional)
$Name = "Name_example" # String |  (optional)
$Tags = @("Inner_example") # String[] |  (optional)
$Favourite = true # Boolean |  (optional)
$VirtualInbox = true # Boolean |  (optional)

# Create new random inbox
try {
     $Result = New-NewEmailAddress -AllowTeamAccess $AllowTeamAccess -UseDomainPool $UseDomainPool -ExpiresAt $ExpiresAt -ExpiresIn $ExpiresIn -EmailAddress $EmailAddress -InboxType $InboxType -Description $Description -Name $Name -Tags $Tags -Favourite $Favourite -VirtualInbox $VirtualInbox
} catch {
    Write-Host ("Exception occured when calling New-NewEmailAddress: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
AllowTeamAccess Boolean [optional]
UseDomainPool Boolean [optional]
ExpiresAt System.DateTime [optional]
ExpiresIn Int64 [optional]
EmailAddress String [optional]
InboxType String [optional]
Description String [optional]
Name String [optional]
Tags String[] [optional]
Favourite Boolean [optional]
VirtualInbox Boolean [optional]

Return type

InboxDto (PSCustomObject)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

InboxDto New-RandomInbox
        [-AllowTeamAccess]
        [-UseDomainPool]
        [-ExpiresAt]
        [-ExpiresIn]
        [-EmailAddress]
        [-InboxType]
        [-Description]
        [-Name]
        [-Tags]
        [-Favourite]
        [-VirtualInbox]

Create new random inbox

Returns an Inbox with an id and an emailAddress

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"

$AllowTeamAccess = true # Boolean |  (optional)
$UseDomainPool = true # Boolean |  (optional)
$ExpiresAt = Get-Date # System.DateTime |  (optional)
$ExpiresIn = 987 # Int64 |  (optional)
$EmailAddress = "EmailAddress_example" # String |  (optional)
$InboxType = "HTTP_INBOX" # String |  (optional)
$Description = "Description_example" # String |  (optional)
$Name = "Name_example" # String |  (optional)
$Tags = @("Inner_example") # String[] |  (optional)
$Favourite = true # Boolean |  (optional)
$VirtualInbox = true # Boolean |  (optional)

# Create new random inbox
try {
     $Result = New-RandomInbox -AllowTeamAccess $AllowTeamAccess -UseDomainPool $UseDomainPool -ExpiresAt $ExpiresAt -ExpiresIn $ExpiresIn -EmailAddress $EmailAddress -InboxType $InboxType -Description $Description -Name $Name -Tags $Tags -Favourite $Favourite -VirtualInbox $VirtualInbox
} catch {
    Write-Host ("Exception occured when calling New-RandomInbox: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
AllowTeamAccess Boolean [optional]
UseDomainPool Boolean [optional]
ExpiresAt System.DateTime [optional]
ExpiresIn Int64 [optional]
EmailAddress String [optional]
InboxType String [optional]
Description String [optional]
Name String [optional]
Tags String[] [optional]
Favourite Boolean [optional]
VirtualInbox Boolean [optional]

Return type

InboxDto (PSCustomObject)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

void Invoke-DeleteEmailAddress
        [-InboxId]

Delete inbox email address by inbox id

Deletes inbox email address

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"

$InboxId = "InboxId_example" # String | 

# Delete inbox email address by inbox id
try {
     $Result = Invoke-DeleteEmailAddress -InboxId $InboxId
} catch {
    Write-Host ("Exception occured when calling Invoke-DeleteEmailAddress: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
InboxId String

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to ]

void Invoke-EmptyInbox
        [-InboxId]

Delete all emails in an inbox

Deletes all emails

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"

$InboxId = "InboxId_example" # String | 

# Delete all emails in an inbox
try {
     $Result = Invoke-EmptyInbox -InboxId $InboxId
} catch {
    Write-Host ("Exception occured when calling Invoke-EmptyInbox: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
InboxId String

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to ]

void Send-EmailSimple
        [-SimpleSendEmailOptions]

Send an email

If no senderId or inboxId provided a random email address will be used to send from.

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"

$SimpleSendEmailOptions = (Initialize-SimpleSendEmailOptions -SenderId "SenderId_example" -To "To_example" -Body "Body_example" -Subject "Subject_example") # SimpleSendEmailOptions | 

# Send an email
try {
     $Result = Send-EmailSimple -SimpleSendEmailOptions $SimpleSendEmailOptions
} catch {
    Write-Host ("Exception occured when calling Send-EmailSimple: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
SimpleSendEmailOptions SimpleSendEmailOptions

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]