Skip to content

maislurp-client-powershell.maislurp-client-powershell/Api.PhoneControllerApi

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

Method HTTP request Description
New-EmergencyAddress POST /phone/emergency-addresses
Invoke-DeleteEmergencyAddress DELETE /phone/emergency-addresses/{addressId}
Invoke-DeletePhoneNumber DELETE /phone/numbers/{phoneNumberId}
Get-EmergencyAddress GET /phone/emergency-addresses/{addressId}
Get-EmergencyAddresses GET /phone/emergency-addresses
Get-PhoneNumber GET /phone/numbers/{phoneNumberId}
Get-PhoneNumbers GET /phone/numbers
Get-PhonePlans GET /phone/plans
Test-PhoneNumberSendSms POST /phone/numbers/{phoneNumberId}/test

EmergencyAddress New-EmergencyAddress
        [-CreateEmergencyAddressOptions]

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"

$CreateEmergencyAddressOptions = (Initialize-CreateEmergencyAddressOptions -CustomerName "CustomerName_example" -Address1 "Address1_example" -City "City_example" -Region "Region_example" -PostalCode "PostalCode_example" -IsoCountryCode "US" -DisplayName "DisplayName_example") # CreateEmergencyAddressOptions | 

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

Parameters

Name Type Description Notes
CreateEmergencyAddressOptions CreateEmergencyAddressOptions

Return type

EmergencyAddress (PSCustomObject)

Authorization

API_KEY

HTTP request headers

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

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

EmptyResponseDto Invoke-DeleteEmergencyAddress
        [-AddressId]

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"

$AddressId = "AddressId_example" # String | 

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

Parameters

Name Type Description Notes
AddressId String

Return type

EmptyResponseDto (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-DeletePhoneNumber
        [-PhoneNumberId]

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"

$PhoneNumberId = "PhoneNumberId_example" # String | 

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

Parameters

Name Type Description Notes
PhoneNumberId 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 ]

EmergencyAddress Get-EmergencyAddress
        [-AddressId]

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"

$AddressId = "AddressId_example" # String | 

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

Parameters

Name Type Description Notes
AddressId String

Return type

EmergencyAddress (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 ]

EmergencyAddressDto[] Get-EmergencyAddresses

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"


try {
     $Result = Get-EmergencyAddresses
} catch {
    Write-Host ("Exception occured when calling Get-EmergencyAddresses: {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

EmergencyAddressDto[] (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 ]

PhoneNumberDto Get-PhoneNumber
        [-PhoneNumberId]

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"

$PhoneNumberId = "PhoneNumberId_example" # String | 

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

Parameters

Name Type Description Notes
PhoneNumberId String

Return type

PhoneNumberDto (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 ]

PagePhoneNumberProjection Get-PhoneNumbers
        [-PhoneCountry]
        [-Page]
        [-Size]
        [-Sort]
        [-Since]
        [-Before]

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"

$PhoneCountry = "US" # String | Optional phone country (optional)
$Page = 987 # Int32 | Optional page  for list pagination (optional) (default to 0)
$Size = 987 # Int32 | Optional page size for list pagination (optional) (default to 20)
$Sort = "ASC" # String | Optional createdAt sort direction ASC or DESC (optional) (default to "ASC")
$Since = Get-Date # System.DateTime | Filter by created at after the given timestamp (optional)
$Before = Get-Date # System.DateTime | Filter by created at before the given timestamp (optional)

try {
     $Result = Get-PhoneNumbers -PhoneCountry $PhoneCountry -Page $Page -Size $Size -Sort $Sort -Since $Since -Before $Before
} catch {
    Write-Host ("Exception occured when calling Get-PhoneNumbers: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
PhoneCountry String Optional phone country [optional]
Page Int32 Optional page for list pagination [optional] [default to 0]
Size Int32 Optional page size for list pagination [optional] [default to 20]
Sort String Optional createdAt sort direction ASC or DESC [optional] [default to "ASC"]
Since System.DateTime Filter by created at after the given timestamp [optional]
Before System.DateTime Filter by created at before the given timestamp [optional]

Return type

PagePhoneNumberProjection (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 ]

PhonePlanDto[] Get-PhonePlans

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"


try {
     $Result = Get-PhonePlans
} catch {
    Write-Host ("Exception occured when calling Get-PhonePlans: {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

PhonePlanDto[] (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 Test-PhoneNumberSendSms
        [-PhoneNumberId]
        [-TestPhoneNumberOptions]
        [-XTestId]

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"

$PhoneNumberId = "PhoneNumberId_example" # String | 
$TestPhoneNumberOptions = (Initialize-TestPhoneNumberOptions -Message "Message_example") # TestPhoneNumberOptions | 
$XTestId = "XTestId_example" # String |  (optional)

try {
     $Result = Test-PhoneNumberSendSms -PhoneNumberId $PhoneNumberId -TestPhoneNumberOptions $TestPhoneNumberOptions -XTestId $XTestId
} catch {
    Write-Host ("Exception occured when calling Test-PhoneNumberSendSms: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
PhoneNumberId String
TestPhoneNumberOptions TestPhoneNumberOptions
XTestId String [optional]

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 ]