Skip to content

maislurp-client-powershell.maislurp-client-powershell/Api.WebhookControllerApi

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

Method HTTP request Description
New-AccountWebhook POST /webhooks Attach a WebHook URL to an inbox
New-Webhook POST /inboxes/{inboxId}/webhooks Attach a WebHook URL to an inbox
New-WebhookForPhoneNumber POST /phone/numbers/{phoneNumberId}/webhooks Attach a WebHook URL to a phone number
Invoke-DeleteAllWebhooks DELETE /webhooks Delete all webhooks
Invoke-DeleteWebhook DELETE /inboxes/{inboxId}/webhooks/{webhookId} Delete and disable a Webhook for an Inbox
Invoke-DeleteWebhookById DELETE /webhooks/{webhookId} Delete a webhook
Get-AllAccountWebhooks GET /webhooks/account/paginated List account webhooks Paginated
Get-AllWebhookResults GET /webhooks/results Get results for all webhooks
Get-AllWebhooks GET /webhooks/paginated List Webhooks Paginated
Get-InboxWebhooksPaginated GET /inboxes/{inboxId}/webhooks/paginated Get paginated webhooks for an Inbox
Get-JsonSchemaForWebhookEvent POST /webhooks/schema
Get-JsonSchemaForWebhookPayload POST /webhooks/{webhookId}/schema
Get-PhoneNumberWebhooksPaginated GET /phone/numbers/{phoneId}/webhooks/paginated Get paginated webhooks for a phone number
Get-TestWebhookPayload GET /webhooks/test
Get-TestWebhookPayloadBounce GET /webhooks/test/email-bounce-payload
Get-TestWebhookPayloadBounceRecipient GET /webhooks/test/email-bounce-recipient-payload
Get-TestWebhookPayloadDeliveryStatus GET /webhooks/test/delivery-status-payload Get webhook test payload for delivery status event
Get-TestWebhookPayloadEmailOpened GET /webhooks/test/email-opened-payload
Get-TestWebhookPayloadEmailRead GET /webhooks/test/email-read-payload
Get-TestWebhookPayloadForWebhook POST /webhooks/{webhookId}/example
Get-TestWebhookPayloadNewAttachment GET /webhooks/test/new-attachment-payload Get webhook test payload for new attachment event
Get-TestWebhookPayloadNewContact GET /webhooks/test/new-contact-payload Get webhook test payload for new contact event
Get-TestWebhookPayloadNewEmail GET /webhooks/test/new-email-payload Get webhook test payload for new email event
Get-TestWebhookPayloadNewSms GET /webhooks/test/new-sms-payload Get webhook test payload for new sms event
Get-Webhook GET /webhooks/{webhookId} Get a webhook
Get-WebhookResult GET /webhooks/results/{webhookResultId} Get a webhook result for a webhook
Get-WebhookResults GET /webhooks/{webhookId}/results Get a webhook results for a webhook
Get-WebhookResultsUnseenErrorCount GET /webhooks/results/unseen-count Get count of unseen webhook results with error status
Get-Webhooks GET /inboxes/{inboxId}/webhooks Get all webhooks for an Inbox
Invoke-RedriveWebhookResult POST /webhooks/results/{webhookResultId}/redrive Get a webhook result and try to resend the original webhook payload
Send-TestData POST /webhooks/{webhookId}/test Send webhook test data
Update-WebhookHeaders PUT /webhooks/{webhookId}/headers Update a webhook request headers
Test-WebhookSignature POST /webhooks/verify Verify a webhook payload signature

WebhookDto New-AccountWebhook
        [-CreateWebhookOptions]

Attach a WebHook URL to an inbox

Get notified of account level events such as bounce and bounce recipient.

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"

$CreateWebhookOptions = (Initialize-CreateWebhookOptions -Url "Url_example" -BasicAuth (Initialize-BasicAuthOptions -Username "Username_example" -Password "Password_example") -Name "Name_example" -EventName "EMAIL_RECEIVED" -IncludeHeaders (Initialize-WebhookHeaders -Headers @((Initialize-WebhookHeaderNameValue -Name "Name_example" -Value "Value_example")))) # CreateWebhookOptions | 

# Attach a WebHook URL to an inbox
try {
     $Result = New-AccountWebhook -CreateWebhookOptions $CreateWebhookOptions
} catch {
    Write-Host ("Exception occured when calling New-AccountWebhook: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
CreateWebhookOptions CreateWebhookOptions

Return type

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

WebhookDto New-Webhook
        [-InboxId]
        [-CreateWebhookOptions]

Attach a WebHook URL to an inbox

Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint.

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 | 
$CreateWebhookOptions = (Initialize-CreateWebhookOptions -Url "Url_example" -BasicAuth (Initialize-BasicAuthOptions -Username "Username_example" -Password "Password_example") -Name "Name_example" -EventName "EMAIL_RECEIVED" -IncludeHeaders (Initialize-WebhookHeaders -Headers @((Initialize-WebhookHeaderNameValue -Name "Name_example" -Value "Value_example")))) # CreateWebhookOptions | 

# Attach a WebHook URL to an inbox
try {
     $Result = New-Webhook -InboxId $InboxId -CreateWebhookOptions $CreateWebhookOptions
} catch {
    Write-Host ("Exception occured when calling New-Webhook: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
InboxId String
CreateWebhookOptions CreateWebhookOptions

Return type

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

WebhookDto New-WebhookForPhoneNumber
        [-PhoneNumberId]
        [-CreateWebhookOptions]

Attach a WebHook URL to a phone number

Get notified whenever a phone number receives an SMS via a WebHook URL.

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 | 
$CreateWebhookOptions =  # CreateWebhookOptions | 

# Attach a WebHook URL to a phone number
try {
     $Result = New-WebhookForPhoneNumber -PhoneNumberId $PhoneNumberId -CreateWebhookOptions $CreateWebhookOptions
} catch {
    Write-Host ("Exception occured when calling New-WebhookForPhoneNumber: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
PhoneNumberId String
CreateWebhookOptions CreateWebhookOptions

Return type

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

void Invoke-DeleteAllWebhooks
        [-Before]

Delete all webhooks

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"

$Before = Get-Date # System.DateTime | before (optional)

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

Parameters

Name Type Description Notes
Before System.DateTime before [optional]

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-DeleteWebhook
        [-InboxId]
        [-WebhookId]

Delete and disable a Webhook for an Inbox

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 | 
$WebhookId = "WebhookId_example" # String | 

# Delete and disable a Webhook for an Inbox
try {
     $Result = Invoke-DeleteWebhook -InboxId $InboxId -WebhookId $WebhookId
} catch {
    Write-Host ("Exception occured when calling Invoke-DeleteWebhook: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
InboxId String
WebhookId 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-DeleteWebhookById
        [-WebhookId]

Delete a webhook

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"

$WebhookId = "WebhookId_example" # String | 

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

Parameters

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

PageWebhookProjection Get-AllAccountWebhooks
        [-Page]
        [-Size]
        [-Sort]
        [-EventType]
        [-Since]
        [-Before]

List account webhooks Paginated

List account webhooks in paginated form. Allows for page , page size, and sort direction.

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"

$Page = 987 # Int32 | Optional page  in list pagination (optional) (default to 0)
$Size = 987 # Int32 | Optional page size for paginated result list. (optional) (default to 20)
$Sort = "ASC" # String | Optional createdAt sort direction ASC or DESC (optional) (default to "DESC")
$EventType = "EMAIL_RECEIVED" # String | Optional event type (optional)
$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)

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

Parameters

Name Type Description Notes
Page Int32 Optional page in list pagination [optional] [default to 0]
Size Int32 Optional page size for paginated result list. [optional] [default to 20]
Sort String Optional createdAt sort direction ASC or DESC [optional] [default to "DESC"]
EventType String Optional event type [optional]
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

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

PageWebhookResult Get-AllWebhookResults
        [-Page]
        [-Size]
        [-Sort]
        [-SearchFilter]
        [-Since]
        [-Before]
        [-UnseenOnly]

Get results for all webhooks

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"

$Page = 987 # Int32 | Optional page  in list pagination (optional) (default to 0)
$Size = 987 # Int32 | Optional page size in list pagination (optional) (default to 20)
$Sort = "ASC" # String | Optional createdAt sort direction ASC or DESC (optional) (default to "ASC")
$SearchFilter = "SearchFilter_example" # String | Optional search filter (optional)
$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)
$UnseenOnly = true # Boolean | Filter for unseen exceptions only (optional)

# Get results for all webhooks
try {
     $Result = Get-AllWebhookResults -Page $Page -Size $Size -Sort $Sort -SearchFilter $SearchFilter -Since $Since -Before $Before -UnseenOnly $UnseenOnly
} catch {
    Write-Host ("Exception occured when calling Get-AllWebhookResults: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
Page Int32 Optional page in list pagination [optional] [default to 0]
Size Int32 Optional page size in list pagination [optional] [default to 20]
Sort String Optional createdAt sort direction ASC or DESC [optional] [default to "ASC"]
SearchFilter String Optional search filter [optional]
Since System.DateTime Filter by created at after the given timestamp [optional]
Before System.DateTime Filter by created at before the given timestamp [optional]
UnseenOnly Boolean Filter for unseen exceptions only [optional]

Return type

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

PageWebhookProjection Get-AllWebhooks
        [-Page]
        [-Size]
        [-Sort]
        [-SearchFilter]
        [-Since]
        [-InboxId]
        [-PhoneId]
        [-Before]

List Webhooks Paginated

List webhooks in paginated form. Allows for page , page size, and sort direction.

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"

$Page = 987 # Int32 | Optional page  in list pagination (optional) (default to 0)
$Size = 987 # Int32 | Optional page size for paginated result list. (optional) (default to 20)
$Sort = "ASC" # String | Optional createdAt sort direction ASC or DESC (optional) (default to "DESC")
$SearchFilter = "SearchFilter_example" # String | Optional search filter (optional)
$Since = Get-Date # System.DateTime | Filter by created at after the given timestamp (optional)
$InboxId = "InboxId_example" # String | Filter by inboxId (optional)
$PhoneId = "PhoneId_example" # String | Filter by phoneId (optional)
$Before = Get-Date # System.DateTime | Filter by created at before the given timestamp (optional)

# List Webhooks Paginated
try {
     $Result = Get-AllWebhooks -Page $Page -Size $Size -Sort $Sort -SearchFilter $SearchFilter -Since $Since -InboxId $InboxId -PhoneId $PhoneId -Before $Before
} catch {
    Write-Host ("Exception occured when calling Get-AllWebhooks: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
Page Int32 Optional page in list pagination [optional] [default to 0]
Size Int32 Optional page size for paginated result list. [optional] [default to 20]
Sort String Optional createdAt sort direction ASC or DESC [optional] [default to "DESC"]
SearchFilter String Optional search filter [optional]
Since System.DateTime Filter by created at after the given timestamp [optional]
InboxId String Filter by inboxId [optional]
PhoneId String Filter by phoneId [optional]
Before System.DateTime Filter by created at before the given timestamp [optional]

Return type

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

PageWebhookProjection Get-InboxWebhooksPaginated
        [-InboxId]
        [-Page]
        [-Size]
        [-Sort]
        [-SearchFilter]
        [-Since]
        [-Before]

Get paginated webhooks for an Inbox

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 | 
$Page = 987 # Int32 | Optional page  in list pagination (optional) (default to 0)
$Size = 987 # Int32 | Optional page size in list pagination (optional) (default to 20)
$Sort = "ASC" # String | Optional createdAt sort direction ASC or DESC (optional) (default to "ASC")
$SearchFilter = "SearchFilter_example" # String | Optional search filter (optional)
$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)

# Get paginated webhooks for an Inbox
try {
     $Result = Get-InboxWebhooksPaginated -InboxId $InboxId -Page $Page -Size $Size -Sort $Sort -SearchFilter $SearchFilter -Since $Since -Before $Before
} catch {
    Write-Host ("Exception occured when calling Get-InboxWebhooksPaginated: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
InboxId String
Page Int32 Optional page in list pagination [optional] [default to 0]
Size Int32 Optional page size in list pagination [optional] [default to 20]
Sort String Optional createdAt sort direction ASC or DESC [optional] [default to "ASC"]
SearchFilter String Optional search filter [optional]
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

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

JSONSchemaDto Get-JsonSchemaForWebhookEvent
        [-Event]

Get JSON Schema definition for webhook payload by event

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"

$Event = "EMAIL_RECEIVED" # String | 

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

Parameters

Name Type Description Notes
Event String

Return type

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

JSONSchemaDto Get-JsonSchemaForWebhookPayload
        [-WebhookId]

Get JSON Schema definition for webhook payload

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"

$WebhookId = "WebhookId_example" # String | 

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

Parameters

Name Type Description Notes
WebhookId String

Return type

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

PageWebhookProjection Get-PhoneNumberWebhooksPaginated
        [-PhoneId]
        [-Page]
        [-Size]
        [-Sort]
        [-Since]
        [-Before]

Get paginated webhooks for a phone number

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"

$PhoneId = "PhoneId_example" # String | 
$Page = 987 # Int32 | Optional page  in list pagination (optional) (default to 0)
$Size = 987 # Int32 | Optional page size in 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)

# Get paginated webhooks for a phone number
try {
     $Result = Get-PhoneNumberWebhooksPaginated -PhoneId $PhoneId -Page $Page -Size $Size -Sort $Sort -Since $Since -Before $Before
} catch {
    Write-Host ("Exception occured when calling Get-PhoneNumberWebhooksPaginated: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
PhoneId String
Page Int32 Optional page in list pagination [optional] [default to 0]
Size Int32 Optional page size in 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

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

AbstractWebhookPayload Get-TestWebhookPayload
        [-EventName]

Get test webhook payload example. Response content depends on eventName passed. Uses EMAIL_RECEIVED as default.

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"

$EventName = "EMAIL_RECEIVED" # String |  (optional)

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

Parameters

Name Type Description Notes
EventName String [optional]

Return type

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

WebhookBouncePayload Get-TestWebhookPayloadBounce

Get webhook test payload for bounce

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-TestWebhookPayloadBounce
} catch {
    Write-Host ("Exception occured when calling Get-TestWebhookPayloadBounce: {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

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

WebhookBounceRecipientPayload Get-TestWebhookPayloadBounceRecipient

Get webhook test payload for bounce recipient

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-TestWebhookPayloadBounceRecipient
} catch {
    Write-Host ("Exception occured when calling Get-TestWebhookPayloadBounceRecipient: {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

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

WebhookDeliveryStatusPayload Get-TestWebhookPayloadDeliveryStatus

Get webhook test payload for delivery status event

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 webhook test payload for delivery status event
try {
     $Result = Get-TestWebhookPayloadDeliveryStatus
} catch {
    Write-Host ("Exception occured when calling Get-TestWebhookPayloadDeliveryStatus: {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

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

WebhookEmailOpenedPayload Get-TestWebhookPayloadEmailOpened

Get webhook test payload for email opened event

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-TestWebhookPayloadEmailOpened
} catch {
    Write-Host ("Exception occured when calling Get-TestWebhookPayloadEmailOpened: {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

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

WebhookEmailReadPayload Get-TestWebhookPayloadEmailRead

Get webhook test payload for email opened event

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-TestWebhookPayloadEmailRead
} catch {
    Write-Host ("Exception occured when calling Get-TestWebhookPayloadEmailRead: {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

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

AbstractWebhookPayload Get-TestWebhookPayloadForWebhook
        [-WebhookId]

Get example payload for webhook

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"

$WebhookId = "WebhookId_example" # String | 

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

Parameters

Name Type Description Notes
WebhookId String

Return type

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

WebhookNewAttachmentPayload Get-TestWebhookPayloadNewAttachment

Get webhook test payload for new attachment event

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 webhook test payload for new attachment event
try {
     $Result = Get-TestWebhookPayloadNewAttachment
} catch {
    Write-Host ("Exception occured when calling Get-TestWebhookPayloadNewAttachment: {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

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

WebhookNewContactPayload Get-TestWebhookPayloadNewContact

Get webhook test payload for new contact event

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 webhook test payload for new contact event
try {
     $Result = Get-TestWebhookPayloadNewContact
} catch {
    Write-Host ("Exception occured when calling Get-TestWebhookPayloadNewContact: {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

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

WebhookNewEmailPayload Get-TestWebhookPayloadNewEmail

Get webhook test payload for new email event

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 webhook test payload for new email event
try {
     $Result = Get-TestWebhookPayloadNewEmail
} catch {
    Write-Host ("Exception occured when calling Get-TestWebhookPayloadNewEmail: {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

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

WebhookNewSmsPayload Get-TestWebhookPayloadNewSms

Get webhook test payload for new sms event

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 webhook test payload for new sms event
try {
     $Result = Get-TestWebhookPayloadNewSms
} catch {
    Write-Host ("Exception occured when calling Get-TestWebhookPayloadNewSms: {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

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

WebhookDto Get-Webhook
        [-WebhookId]

Get a webhook

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"

$WebhookId = "WebhookId_example" # String | 

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

Parameters

Name Type Description Notes
WebhookId String

Return type

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

WebhookResultDto Get-WebhookResult
        [-WebhookResultId]

Get a webhook result for a webhook

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"

$WebhookResultId = "WebhookResultId_example" # String | Webhook Result ID

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

Parameters

Name Type Description Notes
WebhookResultId String Webhook Result ID

Return type

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

PageWebhookResult Get-WebhookResults
        [-WebhookId]
        [-Page]
        [-Size]
        [-Sort]
        [-SearchFilter]
        [-Since]
        [-Before]
        [-UnseenOnly]

Get a webhook results for a webhook

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"

$WebhookId = "WebhookId_example" # String | ID of webhook to get results for
$Page = 987 # Int32 | Optional page  in list pagination (optional) (default to 0)
$Size = 987 # Int32 | Optional page size in list pagination (optional) (default to 20)
$Sort = "ASC" # String | Optional createdAt sort direction ASC or DESC (optional) (default to "ASC")
$SearchFilter = "SearchFilter_example" # String | Optional search filter (optional)
$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)
$UnseenOnly = true # Boolean | Filter for unseen exceptions only (optional)

# Get a webhook results for a webhook
try {
     $Result = Get-WebhookResults -WebhookId $WebhookId -Page $Page -Size $Size -Sort $Sort -SearchFilter $SearchFilter -Since $Since -Before $Before -UnseenOnly $UnseenOnly
} catch {
    Write-Host ("Exception occured when calling Get-WebhookResults: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
WebhookId String ID of webhook to get results for
Page Int32 Optional page in list pagination [optional] [default to 0]
Size Int32 Optional page size in list pagination [optional] [default to 20]
Sort String Optional createdAt sort direction ASC or DESC [optional] [default to "ASC"]
SearchFilter String Optional search filter [optional]
Since System.DateTime Filter by created at after the given timestamp [optional]
Before System.DateTime Filter by created at before the given timestamp [optional]
UnseenOnly Boolean Filter for unseen exceptions only [optional]

Return type

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

UnseenErrorCountDto Get-WebhookResultsUnseenErrorCount

Get count of unseen webhook results with error status

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 count of unseen webhook results with error status
try {
     $Result = Get-WebhookResultsUnseenErrorCount
} catch {
    Write-Host ("Exception occured when calling Get-WebhookResultsUnseenErrorCount: {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

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

WebhookDto[] Get-Webhooks
        [-InboxId]

Get all webhooks for an Inbox

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 | 

# Get all webhooks for an Inbox
try {
     $Result = Get-Webhooks -InboxId $InboxId
} catch {
    Write-Host ("Exception occured when calling Get-Webhooks: {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

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

WebhookRedriveResult Invoke-RedriveWebhookResult
        [-WebhookResultId]

Get a webhook result and try to resend the original webhook payload

Allows you to resend a webhook payload that was already sent. Webhooks that fail are retried automatically for 24 hours and then put in a dead letter queue. You can retry results manually using this method.

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"

$WebhookResultId = "WebhookResultId_example" # String | Webhook Result ID

# Get a webhook result and try to resend the original webhook payload
try {
     $Result = Invoke-RedriveWebhookResult -WebhookResultId $WebhookResultId
} catch {
    Write-Host ("Exception occured when calling Invoke-RedriveWebhookResult: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
WebhookResultId String Webhook Result ID

Return type

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

WebhookTestResult Send-TestData
        [-WebhookId]

Send webhook test data

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"

$WebhookId = "WebhookId_example" # String | 

# Send webhook test data
try {
     $Result = Send-TestData -WebhookId $WebhookId
} catch {
    Write-Host ("Exception occured when calling Send-TestData: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
WebhookId String

Return type

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

WebhookDto Update-WebhookHeaders
        [-WebhookId]
        [-WebhookHeaders]

Update a webhook request headers

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"

$WebhookId = "WebhookId_example" # String | 
$WebhookHeaders =  # WebhookHeaders | 

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

Parameters

Name Type Description Notes
WebhookId String
WebhookHeaders WebhookHeaders

Return type

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

VerifyWebhookSignatureResults Test-WebhookSignature
        [-VerifyWebhookSignatureOptions]

Verify a webhook payload signature

Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server.

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"

$VerifyWebhookSignatureOptions = (Initialize-VerifyWebhookSignatureOptions -MessageId "MessageId_example" -Signature "Signature_example") # VerifyWebhookSignatureOptions | 

# Verify a webhook payload signature
try {
     $Result = Test-WebhookSignature -VerifyWebhookSignatureOptions $VerifyWebhookSignatureOptions
} catch {
    Write-Host ("Exception occured when calling Test-WebhookSignature: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
VerifyWebhookSignatureOptions VerifyWebhookSignatureOptions

Return type

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