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

# Introduction

# Webhooks Overview

Webhooks allow Mailofly to notify your application server in real-time when events occur — such as an email being delivered, opened, clicked, bounced, or flagged as a spam complaint.

***

## How Webhooks Work

```mermaid theme={null}
sequenceDiagram
    participant User as Recipient
    participant Mail as Mailofly Server
    participant App as Your Server

    Mail->>User: Sends Email
    User->>Mail: Opens email or clicks link
    Mail->>App: POST https://yourdomain.com/webhooks/mailofly
    App-->>Mail: 200 OK
```

1. You register a public HTTPS endpoint in your Mailofly dashboard.
2. When an email event occurs, Mailofly sends an HTTP `POST` request with a JSON payload to your endpoint.
3. Your server validates the HMAC signature and processes the event (e.g. updating a customer's record or notifying an account manager).

***

## Setting Up a Webhook

1. In the sidebar, navigate to **Settings** → **Webhooks**.
2. Click **Add Webhook**.
3. Enter your **Endpoint URL** (must be `https://`).
4. Select the event types to listen for (e.g. `email.delivered`, `email.bounced`).
5. Copy the generated **Signing Secret** (`whsec_...`) to verify payloads.

***

## Next Steps

* [Supported Event Types & Payloads](event-types.md)
* [Verifying Webhook Signatures](verify-signatures.md)
* [Retries, Timeouts, and Debugging](retries-and-debugging.md)


## Related topics

- [Introduction](/receiving/introduction.md)
