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

# LC Email Stats | Webhook Events

> Fires for each email delivery event when sending via the LC Email provider.

The `LCEmailStats` event fires for each email delivery event processed through the LC Email provider. This webhook is available exclusively to Location Level Apps. Each payload carries delivery status details, SMTP response codes, envelope routing information, and recipient data. Use this event to track deliverability metrics, build real-time email dashboards, or trigger re-send logic when delivery failures occur.

## Payload

| Field                                  | Type      | Description                                                          |
| -------------------------------------- | --------- | -------------------------------------------------------------------- |
| `event`                                | `string`  | Delivery event type, e.g. `"delivered"`, `"bounced"`, `"complained"` |
| `recipient`                            | `string`  | Email address of the message recipient                               |
| `domain`                               | `string`  | Sending domain used for this message                                 |
| `message-headers`                      | `array`   | Raw email headers from the message                                   |
| `Message-Id`                           | `string`  | Unique message identifier in RFC 5322 format                         |
| `timestamp`                            | `number`  | Unix timestamp of when the event occurred                            |
| `token`                                | `string`  | Webhook authentication token for verifying the request               |
| `signature`                            | `string`  | HMAC signature for validating webhook authenticity                   |
| `delivery-status`                      | `object`  | Detailed delivery outcome information                                |
| `delivery-status.tls`                  | `boolean` | Whether the message was delivered over a TLS-encrypted connection    |
| `delivery-status.mx-host`              | `string`  | MX host that accepted the message                                    |
| `delivery-status.attempt-no`           | `number`  | Delivery attempt number (increments on retries)                      |
| `delivery-status.description`          | `string`  | Human-readable description of the delivery status                    |
| `delivery-status.session-seconds`      | `number`  | Duration of the SMTP session in seconds                              |
| `delivery-status.utf8`                 | `boolean` | Whether UTF-8 encoding was used during the SMTP session              |
| `delivery-status.code`                 | `number`  | SMTP response code returned by the receiving server                  |
| `delivery-status.message`              | `string`  | SMTP response message returned by the receiving server               |
| `delivery-status.certificate-verified` | `boolean` | Whether the receiving server's TLS certificate was verified          |
| `envelope`                             | `object`  | Routing and transport information for the message                    |
| `envelope.transport`                   | `string`  | Transport protocol used, e.g. `"smtp"`                               |
| `envelope.sender`                      | `string`  | From address used in the SMTP envelope                               |
| `envelope.sending-ip`                  | `string`  | IP address from which the message was sent                           |
| `envelope.targets`                     | `string`  | Recipient address(es) in the SMTP envelope                           |
| `flags`                                | `object`  | Additional flags returned by the email provider                      |

## Example payload

```json theme={null}
{
  "event": "delivered",
  "recipient": "contact@example.com",
  "domain": "example.com",
  "Message-Id": "<20231212.09:27:42@example.com>",
  "timestamp": 1702376862,
  "delivery-status": {
    "tls": true,
    "mx-host": "mx.example.com",
    "attempt-no": 1,
    "description": "",
    "session-seconds": 0.087,
    "code": 250,
    "message": "OK",
    "certificate-verified": true
  },
  "envelope": {
    "transport": "smtp",
    "sender": "noreply@hoopai.com",
    "sending-ip": "123.45.67.89",
    "targets": "contact@example.com"
  }
}
```

## Related

* [Emails API](/api-reference/emails/overview) — send and manage emails through the HoopAI platform
