> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhook Events

> All the things Mailofly can tell you about — and what the messages look like.

# Webhook Events 📡

Every time something notable happens to one of your emails, Mailofly fires an event to your webhook URL. Here's the full list of events you can listen for:

***

## All available events

| Event | When does it fire? |
| :- | :- |
| `email.sent` | Email left Mailofly and is on its way to the recipient's mail server |
| `email.delivered` | Recipient's mail server confirmed it accepted the email ✅ |
| `email.opened` | Recipient opened the email (detected via tracking pixel) 👀 |
| `email.clicked` | Recipient clicked a link inside the email 🖱️ |
| `email.bounced` | Email couldn't be delivered — hard or soft bounce ❌ |
| `email.complained` | Recipient marked it as spam 🚫 |
| `contact.created` | A new contact was added to your audience 👤 |
| `domain.verified` | Your domain passed DNS verification 🌐 |

***

## What the payload looks like

### `email.delivered`

```json theme={null}
{
  "event": "email.delivered",
  "created_at": "2026-09-11T00:45:00Z",
  "data": {
    "email_id": "msg_01J8G52XYZ9A8B7C6D",
    "from": "Acme <notifications@acme.com>",
    "to": ["user@example.com"],
    "subject": "Your Order Confirmation",
    "tags": {
      "order_id": "ord_1001"
    }
  }
}
```

### `email.bounced`

```json theme={null}
{
  "event": "email.bounced",
  "created_at": "2026-09-11T00:45:05Z",
  "data": {
    "email_id": "msg_01J8G52XYZ9A8B7C6D",
    "from": "Acme <notifications@acme.com>",
    "to": ["invalid@example.com"],
    "bounce_type": "permanent",
    "diagnostic_code": "550 5.1.1 User unknown"
  }
}
```

***

## Tips

* `email.opened` and `email.clicked` require tracking to be enabled for your sending domain
* Use `tags` in your send requests to attach custom metadata (like order IDs) that comes back in the webhook payload — super useful for matching events to your records


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.