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 |
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 |
// 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
Name | Type | Description | Notes |
---|---|---|---|
createTrackingPixelOptions | CreateTrackingPixelOptions |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
open class func getAllTrackingPixels( page: Int? = nil, size: Int? = nil, sort: Sort_getAllTrackingPixels? = nil, searchFilter: String? = nil, since: Date? = nil, before: Date? = 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 page = 987 // Int | Optional page in list pagination (optional) (default to 0)
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)
let searchFilter = "searchFilter_example" // String | Optional search filter (optional)
let since = Date() // Date | Filter by created at after the given timestamp (optional)
let before = Date() // Date | Filter by created at before the given timestamp (optional)
// Get tracking pixels
TrackingControllerAPI.getAllTrackingPixels(page: page, size: size, sort: sort, searchFilter: searchFilter, since: since, before: before).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
Name | Type | Description | Notes |
---|---|---|---|
page | Int | Optional page in list pagination | [optional] [default to 0] |
size | Int | 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 | Date | Filter by created at after the given timestamp | [optional] |
before | Date | Filter by created at before the given timestamp | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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 |
// 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
Name | Type | Description | Notes |
---|---|---|---|
_id | UUID |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]