Skip to content

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

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

Method HTTP request Description
New-TrackingPixel POST /tracking/pixels Create tracking pixel
Get-AllTrackingPixels GET /tracking/pixels Get tracking pixels
Get-TrackingPixel GET /tracking/pixels/{id} Get pixel

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 | 

# 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

Name Type Description Notes
CreateTrackingPixelOptions CreateTrackingPixelOptions

Return type

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

PageTrackingPixelProjection Get-AllTrackingPixels
        [-Page]
        [-Size]
        [-Sort]
        [-SearchFilter]
        [-Since]
        [-Before]

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"

$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 tracking pixels
try {
     $Result = Get-AllTrackingPixels -Page $Page -Size $Size -Sort $Sort -SearchFilter $SearchFilter -Since $Since -Before $Before
} 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

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]

Return type

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

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 | 

# 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

Name Type Description Notes
Id String

Return type

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