Send email notification on API call failure


We provide enterprise software as a service where part of our service is to allow api access to the enterprise data. We need to send out email to some specific users in respective customer enterprises when there are api call failures that have specific status codes or where the response body contains certain error codes. This is so that where customer has set up some automation and the automation is running into failures, they become aware of it in case they don’t have any monitoring on their side.

We are using community edition and we are trying to figure out the best way to do this. We are using number of plugins including our own authentication plugin so we don’t want to have to change every component in the API path to have to trigger sending email. It would seem like we need a plugin that can look at every response going out with error status codes (and also maybe look at error code in payload) where we can trigger sending email (make a call to another service that we have).

Is there a plugin that already exists that we can use for this or do we need to write our own? Does enterprise edition have support for something like this?


Not that I know of but I do know that people have implemented this before.

Not at the moment. There are other ways to get alerted onAPI errors in the Enterprise platform.

This looks like a good use for Moesif’s behavioral emails There is a Kong plugin available: