Skip to content

TrackingControllerApi

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

Method HTTP request Description
createTrackingPixel POST /tracking/pixels Create tracking pixel
getAllTrackingPixels GET /tracking/pixels Get tracking pixels
getTrackingPixel GET /tracking/pixels/{id} Get pixel

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

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = TrackingControllerApi()
val createTrackingPixelOptions : CreateTrackingPixelOptions =  // CreateTrackingPixelOptions | 
try {
    val result : TrackingPixelDto = apiInstance.createTrackingPixel(createTrackingPixelOptions)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling TrackingControllerApi#createTrackingPixel")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling TrackingControllerApi#createTrackingPixel")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
createTrackingPixelOptions CreateTrackingPixelOptions

Return type

TrackingPixelDto

Authorization

Configure API_KEY: ApiClient.apiKey["x-api-key"] = "" ApiClient.apiKeyPrefix["x-api-key"] = ""

HTTP request headers

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

PageTrackingPixelProjection getAllTrackingPixels(page, size, sort, searchFilter, since, before)

Get tracking pixels

List tracking pixels in paginated form

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = TrackingControllerApi()
val page : kotlin.Int = 56 // kotlin.Int | Optional page  in list pagination
val size : kotlin.Int = 56 // kotlin.Int | Optional page size in list pagination
val sort : kotlin.String = sort_example // kotlin.String | Optional createdAt sort direction ASC or DESC
val searchFilter : kotlin.String = searchFilter_example // kotlin.String | Optional search filter
val since : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | Filter by created at after the given timestamp
val before : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | Filter by created at before the given timestamp
try {
    val result : PageTrackingPixelProjection = apiInstance.getAllTrackingPixels(page, size, sort, searchFilter, since, before)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling TrackingControllerApi#getAllTrackingPixels")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling TrackingControllerApi#getAllTrackingPixels")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
page kotlin.Int Optional page in list pagination [optional] [default to 0]
size kotlin.Int Optional page size in list pagination [optional] [default to 20]
sort kotlin.String Optional createdAt sort direction ASC or DESC [optional] [default to ASC] [enum: ASC, DESC]
searchFilter kotlin.String Optional search filter [optional]
since java.time.OffsetDateTime Filter by created at after the given timestamp [optional]
before java.time.OffsetDateTime Filter by created at before the given timestamp [optional]

Return type

PageTrackingPixelProjection

Authorization

Configure API_KEY: ApiClient.apiKey["x-api-key"] = "" ApiClient.apiKeyPrefix["x-api-key"] = ""

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

TrackingPixelDto getTrackingPixel(id)

Get pixel

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = TrackingControllerApi()
val id : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | 
try {
    val result : TrackingPixelDto = apiInstance.getTrackingPixel(id)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling TrackingControllerApi#getTrackingPixel")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling TrackingControllerApi#getTrackingPixel")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
id java.util.UUID

Return type

TrackingPixelDto

Authorization

Configure API_KEY: ApiClient.apiKey["x-api-key"] = "" ApiClient.apiKeyPrefix["x-api-key"] = ""

HTTP request headers

  • Content-Type: Not defined
  • Accept: /