Back to main menu

Product

Weekly product update: Manage your webhooks programmatically with new API

Mailgun released their webhooks beta for testing! Read more about how the beta went down here...

PUBLISHED ON

PUBLISHED ON

We usually publish a weekly update on Friday, but this week, we didn’t want to wait till then to tell you what you can start doing with Mailgun today. We’ve just released our new beta webhook API so that you can programmatically manage webhooks for all your domains! Our new webhook API, now in private beta, comes on the heels of two other much-requested webhooks features: domain-level webhooks and easy testing of webhook endpoints. Read on for the details, and email us at beta@mailgun.net if you’d like to gain access to try it out.

Managing your webhooks via API

The new Webhooks API is available for the following events and allows you to perform the following operations.

  • deliver

  • bounce

  • drop

  • spam

  • unsubscribe

  • click

  • open

Available operations

  • List webhooks for an account

  • Return detail for a single webhook

  • Create new webhook

  • Update existing webhook

  • Delete existing webhook

What you can do with this new API

The new webhooks API was created to extend the functionality that we introduced a couple of weeks ago with the new Domains API, also in private Beta. Together, these new APIs let you set up and manage large scale applications that let your own end customers send completely white-labeled emails via your platform. For instance, let’s say you have a new CRM app that lets your customers email their sales prospects. With our new Domains and Webhooks API, you can:

  • Create a new domain for each customer (e.g. email.example1, email.example2.com, etc)

  • Retrieve DNS records in order to send properly authenticated emails

  • Retrieve SMTP credentials for each domain

  • Set up webhooks endpoints to track email activity for reporting

You can use either SMTP or the HTTP API to send emails. For tracking we offer both push (webhooks) and pull (APIs) methods to access the data. If you would like us to post the data to your URL as it happens, here are some specific examples of additional things that you can do when webhooks are enabled:

Tie email data to custom data you have stored in your main customer database

Prompt users of your app to update their email address when you detect that their current email address no longer works

Build an application or reporting that tracks the geolocation and device type used to open/click on your emails

We hope you enjoy using our new Beta APIs. Email us at beta@mailgun.net if you’d like access and please, let us know what you think.

Happy emailing,

The 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

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

An expanded Mailgun product suite to transform email deliverability

Today marks a special day for Sinch Mailgun. For over a decade, our focus has been to provide the best email experience for businesses all around the world. Now, we take...

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