Weekly product update: New events API available for private beta

Posted on August 2, 2013.



Posted on August 2, 2013.

We believe in giving our customers full transparency into what is happening with their emails. That is why we show our customers what is happening with each and every email that gets sent or received through Mailgun with Logs.

Recently, we’ve been working on improving log data by giving customers even more data and enhancing the experience of retrieving that data. Like almost all features at Mailgun, the first interface we build is the API, with the GUI to follow. We are pleased to announce the private beta release of our Events API, which will be the foundation for Logs and other reporting in the future.

So how did we improve on Logs?

Better pagination

Previously, we just had simple skip and limit parameters to specify which portions of the logs you wanted to fetch. This was cumbersome and resulted in poor performance characteristics. With the new Events API, we’ve provided parameters that allow you to specify a time period in addition to the ability to specify ascending or descending. We also provide URLs in the response for retrieving the next and previous pages, giving you the ability to easily traverse log data.

Allow for detailed querying with filter expressions

Previously, you could only fetch all of the log data within the specified skip and limit parameters. Then you’d have to filter the data on your side. The Events API allows for filtering the data by a bunch of additional parameters and the ability to combine expressions in order to create complex queries.

Include more events

Previously, with the Logs API, we only included information that happens to your email until it is accepted by the recipient email server or dropped. You could get the other events through the Campaigns API but we thought it would better to include all events in one easy to use API. The Events API allows you to query for all events, including those that occur after delivery like opens, clicks, unsubscribes and spam complaints.

How much does this awesome API cost?

Free for you my friend. For free accounts, we retain events for 2 days. For paid accounts, we retain events for 30 days. If you need retention for longer than that, contact us to discuss your needs.

How can I try out the new API?

If you are interested in playing with the Events API, feel free to send us an email: with your github handle and we’ll give you access to the private docs.

We hope this release dramatically improves the experience of tracking your emails. Please provide any feedback!

Happy sending! Mailgunners

Let's talk email

Learn about our deliverability services

See what you can accomplish with the world's best email delivery platform and experts at your disposal.

Related readings

Email validation – Why is it vital for your inbox?

We all have those moments when we get nervous and need to double-check ourselves. Did we fill in the right answer bubbles on a test? Did we type in the right password when...

Read more

We went to Unspam! Here’s what we learned

Here’s how Really Good Email’s describes Unspam, A rebel conference for email folks who hate boring conferences… unexpected, unconventional, and unforgettable. We know that...

Read more

How to send transactional email in a NodeJS app using the Mailgun API

Sending transactional emails is easy regardless of your tools. If you use a NodeJS helper library, this walkthrough will help you get set up in Mailgun. Read more...

Read more

Popular posts

Email inbox.

Build Laravel 10 email authentication with Mailgun and Digital Ocean

When it was first released, Laravel version 5.7 added a new capability to verify user’s emails. If you’ve ever run php artisan make:auth within a Laravel app you’ll know the...

Read more

Mailgun statistics.

Sending email using the Mailgun PHP API

It’s been a while since the Mailgun PHP SDK came around, and we’ve seen lots of changes: new functionalities, new integrations built on top, new API endpoints…yet the core of PHP...

Read more

Statistics on deliverability.

Here’s everything you need to know about DNS blocklists

The word “blocklist” can almost seem like something out of a movie – a little dramatic, silly, and a little unreal. Unfortunately, in the real world, blocklists are definitely something you...

Read more

See what you can accomplish with the world's best email delivery platform. It's easy to get started.Let's get sending
CTA icon