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

    open class func createTrackingPixel( createTrackingPixelOptions: CreateTrackingPixelOptions) -> Promise<TrackingPixelDto>

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

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let createTrackingPixelOptions = CreateTrackingPixelOptions(name: "name_example", recipient: "recipient_example") // CreateTrackingPixelOptions | createTrackingPixelOptions

// Create tracking pixel
TrackingControllerAPI.createTrackingPixel(createTrackingPixelOptions: createTrackingPixelOptions).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

NameTypeDescriptionNotes
createTrackingPixelOptionsCreateTrackingPixelOptionscreateTrackingPixelOptions

Return type

TrackingPixelDto

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 ]

getAllTrackingPixels

    open class func getAllTrackingPixels( before: Date? = nil,  page: Int? = nil,  searchFilter: String? = nil,  since: Date? = nil,  size: Int? = nil,  sort: Sort_getAllTrackingPixels? = nil) -> Promise<PageTrackingPixelProjection>

Get tracking pixels

List tracking pixels in paginated form

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let before = Date() // Date | Filter by created at before the given timestamp (optional)
let page = 987 // Int | Optional page  in list pagination (optional) (default to 0)
let searchFilter = "searchFilter_example" // String | Optional search filter (optional)
let since = Date() // Date | Filter by created at after the given timestamp (optional)
let size = 987 // Int | Optional page size in list pagination (optional) (default to 20)
let sort = "sort_example" // String | Optional createdAt sort direction ASC or DESC (optional) (default to .asc)

// Get tracking pixels
TrackingControllerAPI.getAllTrackingPixels(before: before, page: page, searchFilter: searchFilter, since: since, size: size, sort: sort).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

NameTypeDescriptionNotes
beforeDateFilter by created at before the given timestamp[optional]
pageIntOptional page in list pagination[optional] [default to 0]
searchFilterStringOptional search filter[optional]
sinceDateFilter by created at after the given timestamp[optional]
sizeIntOptional page size in list pagination[optional] [default to 20]
sortStringOptional createdAt sort direction ASC or DESC[optional] [default to .asc]

Return type

PageTrackingPixelProjection

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 ]

getTrackingPixel

    open class func getTrackingPixel( _id: UUID) -> Promise<TrackingPixelDto>

Get pixel

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let _id = 987 // UUID | id

// Get pixel
TrackingControllerAPI.getTrackingPixel(_id: _id).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

NameTypeDescriptionNotes
_idUUIDid

Return type

TrackingPixelDto

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 ]