MailSlurp::TrackingControllerApi

Load the API package

use MailSlurp::Object::TrackingControllerApi;

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

MethodHTTP requestDescription
create_tracking_pixelPOST /tracking/pixelsCreate tracking pixel
get_all_tracking_pixelsGET /tracking/pixelsGet tracking pixels
get_tracking_pixelGET /tracking/pixels/{id}Get pixel

create_tracking_pixel

TrackingPixelDto create_tracking_pixel(create_tracking_pixel_options => $create_tracking_pixel_options)

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

use Data::Dumper;
use MailSlurp::TrackingControllerApi;
my $api_instance = MailSlurp::TrackingControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $create_tracking_pixel_options = MailSlurp::Object::CreateTrackingPixelOptions->new(); # CreateTrackingPixelOptions | createTrackingPixelOptions

eval { 
    my $result = $api_instance->create_tracking_pixel(create_tracking_pixel_options => $create_tracking_pixel_options);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TrackingControllerApi->create_tracking_pixel: $@n";
}

Parameters

NameTypeDescriptionNotes
create_tracking_pixel_optionsCreateTrackingPixelOptionscreateTrackingPixelOptions

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 ]

get_all_tracking_pixels

PageTrackingPixelProjection get_all_tracking_pixels(before => $before, page => $page, search_filter => $search_filter, since => $since, size => $size, sort => $sort)

Get tracking pixels

List tracking pixels in paginated form

Example

use Data::Dumper;
use MailSlurp::TrackingControllerApi;
my $api_instance = MailSlurp::TrackingControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $before = DateTime->from_epoch(epoch => str2time('null')); # DateTime | Filter by created at before the given timestamp
my $page = 0; # int | Optional page  in list pagination
my $search_filter = "search_filter_example"; # string | Optional search filter
my $since = DateTime->from_epoch(epoch => str2time('null')); # DateTime | Filter by created at after the given timestamp
my $size = 20; # int | Optional page size in list pagination
my $sort = 'ASC'; # string | Optional createdAt sort direction ASC or DESC

eval { 
    my $result = $api_instance->get_all_tracking_pixels(before => $before, page => $page, search_filter => $search_filter, since => $since, size => $size, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TrackingControllerApi->get_all_tracking_pixels: $@n";
}

Parameters

NameTypeDescriptionNotes
beforeDateTimeFilter by created at before the given timestamp[optional]
pageintOptional page in list pagination[optional] [default to 0]
search_filterstringOptional search filter[optional]
sinceDateTimeFilter 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 ]

get_tracking_pixel

TrackingPixelDto get_tracking_pixel(id => $id)

Get pixel

Example

use Data::Dumper;
use MailSlurp::TrackingControllerApi;
my $api_instance = MailSlurp::TrackingControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $id = null; # string | id

eval { 
    my $result = $api_instance->get_tracking_pixel(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TrackingControllerApi->get_tracking_pixel: $@n";
}

Parameters

NameTypeDescriptionNotes
idstringid

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 ]