Webhooks - Delivery Event

Mailazy Delivery Webhook Event and Specification


Mailazy notifies your application that an email was successfully delivered to the receiving server. This can be useful in a variety of situations, such as providing end-users with real-time delivery events, measuring how long it takes for an email to get to their inboxes, or simply for auditing purposes. An email is considered successfully delivered when the destination email server returns an OK response after delivery is attempted.

Delivery webhook data

An example of the full JSON document that would be POSTed to your webhook URL is to the right. A brief description of some of the more interesting fields is below:

{
  "recipient": "recipient@example.com",
  "queued_at": 1651741331,
  "delivered_at": 1651741332,
  "message_id": "<627392932262b948589282b2@mailazy.net>",
  "subject": "example subject",
  "response": "2.0.0 OK",
  "event_type": "delivery"
}

Use-cases

There are many possible uses for the data provided by using the delivery webhook:

  • You get instantly informed that a particular email has been delivered and you can initiate further action based on that event.
  • You could use the data to generate statistics that are specific to your application.
  • You could use the data to provide your users with a UI enabling them to see what happened with their email notifications.
  • You could use the data to see how fast your emails are getting delivered.