Skip to content

Retrieving Message Statistics

Andrew Theken edited this page Jan 16, 2015 · 2 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:

$client = new PostmarkClient("<server token>");

$outboundOverviewStats = $client
	.getOutboundOverviewStatistics("tag1", '2014-12-15', '2014-12-25');

Get Sent Counts:

$client = new PostmarkClient("<server token>");

$outboundSentCounts = $client
	.getOutboundSendStatistics("tag1",'2014-12-15', '2014-12-25');

Get Bounce Counts:

$client = new PostmarkClient("<server token>");

$outboundBounceCounts = $client
	.getOutboundBounceStatistics("tag1", '2014-12-15', '2014-12-25');

Get SPAM Complaints:

$client = new PostmarkClient("<server token>");

$spamComplaints = $client->
	getOutboundSpamComplaintStatistics("tag1",'2014-12-15', '2014-12-25');

Get Tracked Email Counts:

$client = new PostmarkClient("<server token>");

$trackingCounts = $client->
	getOutboundTrackedStatistics("tag1",'2014-12-15', '2014-12-25');

Get Open Counts:

$client = new PostmarkClient("<server token>");

$openCounts = $client->
	getOutboundOpenStatistics("tag1",'2014-12-15', '2014-12-25');

Get Platform Usage:

$client = new PostmarkClient("<server token>");

$platformUsage = $client->
	getOutboundPlatformStatistics("tag1",'2014-12-15', '2014-12-25');

Get Email Client Usage:

$client = new PostmarkClient("<server token>");

$mailClientCounts = $client->
	getOutboundEmailClientStatistics("tag1",'2014-12-15', '2014-12-25');

Get Read Times:

$client = new PostmarkClient("<server token>");

$readTimes = $client->
	getOutboundReadTimeStatistics("tag1",'2014-12-15', '2014-12-25');