Skip to content

Retrieving Message Statistics

Andrew Theken edited this page Dec 12, 2014 · 3 revisions

The Postmark API allows you to gain powerful insights into the deliverability and effectiveness of the email you send. The PostmarkClient supports retrieving these statistics through the API.

Get Outbound Overview:

var client = new PostmarkClient("");

var outboundOverviewStats = await client
	.GetOutboundOverviewStatsAsync("tag1",
        DateTime.UtcNow - TimeSpan.FromDays(3), 
        DateTime.UtcNow);

Get Sent Counts:

var client = new PostmarkClient("");

var outboundSentCounts = await client
	.GetOutboundSentCountsAsync("tag1",
		DateTime.UtcNow - TimeSpan.FromDays(3), 
		DateTime.UtcNow)

Get Bounce Counts:

var client = new PostmarkClient("");

var outboundBounceCounts = await client
	.GetOutboundBounceCountsAsync("tag1",
        DateTime.UtcNow - TimeSpan.FromDays(3), 
        DateTime.UtcNow)

Get SPAM Complaints:

var client = new PostmarkClient("");

var spamComplaints = await client
	.GetOutboundSpamComplaintCountsAsync("tag1",
		DateTime.UtcNow - TimeSpan.FromDays(3),
        DateTime.UtcNow)

Get Tracked Email Counts:

var client = new PostmarkClient("");

var trackingCounts = await client
	.GetOutboundTrackingCountsAsync("tag1",
		DateTime.UtcNow - TimeSpan.FromDays(3),
		DateTime.UtcNow)

Get Open Counts:

var client = new PostmarkClient("");

var openCounts = await client
	.GetOutboundOpenCountsAsync("tag1",
        DateTime.UtcNow - TimeSpan.FromDays(3),
        DateTime.UtcNow);

Get Platform Usage:

var client = new PostmarkClient("");

var platformUsage = await client
	.GetOutboundPlatformCountsAsync("tag1",
        DateTime.UtcNow - TimeSpan.FromDays(3),
        DateTime.UtcNow);

Get Client Usage:

var client = new PostmarkClient("");

var mailClientCounts = await client
	.GetOutboundClientUsageCountsAsync("tag1",
            DateTime.UtcNow - TimeSpan.FromDays(3),
            DateTime.UtcNow);

Get Read Times:

var client = new PostmarkClient("");

var readTimes = await client
	.GetOutboundReadtimeStatsAsync("tag1",
		DateTime.UtcNow - TimeSpan.FromDays(3),
		DateTime.UtcNow);

Clone this wiki locally