Webhooks - Engagement Event

Mailazy Engagement Webhook Event

Engagement events include open, click, spam report, unsubscribe. Engagement webhook can instantly notify your application of message opens by POST request with the data in a JSON document to the webhook URL that you configured. If a recipient opens an email multiple times, Mailazy only stores the first open. similarly, If a recipient clicks on a link multiple times, Mailazy only stores the first click event.

Engagement webhook data

  "event_type": "engagement",
  "engagement_type": "Opened",
  "engagement_code": 8016,
  "message_id": "<627392932262b948589282b2@mailazy.net>",
  "queued_at": 1651741331,
  "delivered_at": 1651741332,
  "event_received_at": 1651741339,
  "from": "sender@example.com",
  "recipient": "recipient@example.com",
  "subject": "example subject",
  "suppressed": false,
  "can_unsuppress": true,
  "trace_available": true

Engagement Types

Engagement types and their code are as follows:

SpamComplaint8001message was explicitly marked as spam
Unsubscribe8002unsubscribe request
AutoResponder8008automatic email responder
Opened8016email was opened
Clicked8032email link was clicked


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

  • Which users aren’t looking at their emails? Where are my users reading emails?
  • Determine from when and where a recipient clicked on a link. This is especially helpful when open tracking data is not available.
  • A/B test the performance of your transactional email layouts.
  • You get instantly informed that a particular email has been explicitly marked as spam and you can initiate further action based on that event, the data could be used 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.