# Email Notification Log

An **Email Notification Log** is a read-only audit entry generated automatically by the platform each time an [Email Notification](/email-notification) rule is triggered. It maps the sending attempt to the underlying [Event Log](/event-log) and tracks whether the message is pending delivery or has been successfully processed.

:::info
Email Notification Logs are strictly **read-only** (`GET`, `LIST`) audit trails generated by the system. They cannot be created, modified, or deleted by administrators.
:::

---

## How it works

1. **Rule triggers** — a member's activity triggers an active [Email Notification](/email-notification) rule.
2. **Log created** — the system generates an `Email Notification Log` entry in the `pending` status, linking to the triggering [Event Log](/event-log).
3. **Email compiled & sent** — the system renders the email subject/body (including header and footer wrappers, and merging user placeholders) and dispatches it to the mail sender.
4. **Status updated** — once successfully handed off to the mail server, the status transitions to `processed`.

---

## Fields

### Audit information

| Field | Type | Description |
|---|---|---|
| `emailNotificationId` | UUID | Reference to the triggered [Email Notification](/email-notification) configuration rule |
| `eventLogId` | UUID | Reference to the triggering event record in the [Event Log](/event-log) |

### Status

| Field | Type | Default | Description |
|---|---|---|---|
| `emailNotificationLogStatus` | enum | `pending` | The delivery status: `pending` · `processed` |
| `status` | enum | `live` | Log visibility status: `draft` · `live` · `paused` |

---

## Real-world examples

**🔍 Reading a Notification Log Entry**

An entry showing that a challenge completion event successfully sent an email to the member:

```json
{
  "id": "019985db-c631-74b1-913d-b404a5640c8e",
  "createdAt": "2026-07-14T08:00:00.000Z",
  "updatedAt": "2026-07-14T08:00:02.000Z",
  "emailNotificationId": "a123e456-e89b-12d3-a456-426614174000",
  "eventLogId": "b123e456-e89b-12d3-a456-426614174001",
  "emailNotificationLogStatus": "processed",
  "status": "live"
}
```

---

## Access & permissions

| Caller | Allowed operations | Notes |
|---|---|---|
| Admin | GET · LIST | Read-only audit records |
| End user | *(none)* | No access |
| Guest user | *(none)* | No access |

---

## Related resources

| Resource | Description |
|---|---|
| [Email Notification](/email-notification) | The active notification trigger rule |
| [Event Log](/event-log) | The source system event log that initiated the notification |
| [Member](/member) | The member recipient associated with the event and notification |

---

## API reference

See the [API Reference](/api/email_notification_log) for full request/response schemas and interactive examples for:

- `GET /schema/email_notification_log/record` — list email notification logs
- `GET /schema/email_notification_log/record/{id}` — get an email notification log by ID
