TrackingControllerApi

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

MethodHTTP requestDescription
createTrackingPixelPOST /tracking/pixelsCreate tracking pixel
getAllTrackingPixelsGET /tracking/pixelsGet tracking pixels
getTrackingPixelGET /tracking/pixels/{id}Get pixel

createTrackingPixel

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 | 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

NameTypeDescriptionNotes
createTrackingPixelOptionsCreateTrackingPixelOptionscreateTrackingPixelOptions

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: application/json

getAllTrackingPixels

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

Get tracking pixels

List tracking pixels in paginated form

Example

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

val apiInstance = TrackingControllerApi()
val before : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | Filter by created at before the given timestamp
val page : kotlin.Int = 56 // kotlin.Int | Optional page  in list pagination
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 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
try {
    val result : PageTrackingPixelProjection = apiInstance.getAllTrackingPixels(before, page, searchFilter, since, size, sort)
    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

NameTypeDescriptionNotes
beforejava.time.OffsetDateTimeFilter by created at before the given timestamp[optional]
pagekotlin.IntOptional page in list pagination[optional] [default to 0]
searchFilterkotlin.StringOptional search filter[optional]
sincejava.time.OffsetDateTimeFilter by created at after the given timestamp[optional]
sizekotlin.IntOptional page size in list pagination[optional] [default to 20]
sortkotlin.StringOptional createdAt sort direction ASC or DESC[optional] [default to ASC] [enum: ASC, DESC]

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: application/json

getTrackingPixel

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 | id
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

NameTypeDescriptionNotes
idjava.util.UUIDid

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: application/json