maislurp-client-powershell.maislurp-client-powershell/Api.TrackingControllerApi

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

MethodHTTP requestDescription
New-TrackingPixelPOST /tracking/pixelsCreate tracking pixel
Get-AllTrackingPixelsGET /tracking/pixelsGet tracking pixels
Get-TrackingPixelGET /tracking/pixels/{id}Get pixel

New-TrackingPixel

TrackingPixelDto New-TrackingPixel         [-CreateTrackingPixelOptions]

Create tracking pixel

Create a tracking pixel. A tracking pixel is an image that can be embedded in an email. When the email is viewed and the image is seen MailSlurp will mark the pixel as seen. Use tracking pixels to monitor email open events. You can receive open notifications via webhook or by fetching the pixel.

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"

$CreateTrackingPixelOptions = (Initialize-CreateTrackingPixelOptions -Name "Name_example" -Recipient "Recipient_example") # CreateTrackingPixelOptions | createTrackingPixelOptions

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

Parameters

NameTypeDescriptionNotes
CreateTrackingPixelOptionsCreateTrackingPixelOptionscreateTrackingPixelOptions

Return type

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

Get-AllTrackingPixels

PageTrackingPixelProjection Get-AllTrackingPixels         [-Before] <System.Nullable[System.DateTime]>         [-Page] <System.Nullable[Int32]>         [-SearchFilter]         [-Since] <System.Nullable[System.DateTime]>         [-Size] <System.Nullable[Int32]>         [-Sort]

Get tracking pixels

List tracking pixels in paginated form

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 | Filter by created at before the given timestamp (optional)
$Page = 987 # Int32 | Optional page  in list pagination (optional) (default to 0)
$SearchFilter = "SearchFilter_example" # String | Optional search filter (optional)
$Since = Get-Date # System.DateTime | Filter by created at after the given timestamp (optional)
$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")

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

Parameters

NameTypeDescriptionNotes
BeforeSystem.DateTimeFilter by created at before the given timestamp[optional]
PageInt32Optional page in list pagination[optional] [default to 0]
SearchFilterStringOptional search filter[optional]
SinceSystem.DateTimeFilter by created at after the given timestamp[optional]
SizeInt32Optional page size in list pagination[optional] [default to 20]
SortStringOptional createdAt sort direction ASC or DESC[optional] [default to “ASC”]

Return type

PageTrackingPixelProjection (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-TrackingPixel

TrackingPixelDto Get-TrackingPixel         [-Id]

Get pixel

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 pixel
try {
     $Result = Get-TrackingPixel -Id $Id
} catch {
    Write-Host ("Exception occured when calling Get-TrackingPixel: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

NameTypeDescriptionNotes
IdStringid

Return type

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