# Email logs

> Find any email you sent or received, see what happened to it, and inspect the API and SMTP requests and events behind it.

Emailit records every email that passes through your workspace, every API and SMTP request made with your keys, and every event it sends to webhooks. This page explains where each record lives in the dashboard and how long it's kept, so you know where to look when you need to answer "did it arrive?" or "why did that call fail?".

## Where to look

| Question | Where | What you see |
| --- | --- | --- |
| Did my email arrive? What did the receiving server say? | **Email API → Emails** | Each outgoing or incoming email, its status, delivery attempts, opens, clicks and spam checks. |
| Why did my API call or SMTP session fail? | **Email API → Logs** | Each API v2 request and SMTP transaction made with an API key, with status code and request and response bodies. |
| What happened in my workspace, and what did webhooks receive? | **Email API → Events** | The event stream: status changes, opens, clicks, inbound mail and changes to resources. |
| How is sending going overall? | **Email API → Analytics** | Charts and totals. See [Analytics](/docs/analytics/). |

## Emails

**Email API → Emails** lists individual emails. Every recipient of a send is a separate email with its own `em_` ID and status.

- **Tabs:** **Outgoing** shows mail you sent with the API, SMTP, campaigns, automations and Compose. **Incoming** shows mail received on your [inbound](/docs/inbound/) subdomain.
- **Search:** matches the recipient, sender or subject.
- **Date range:** without a range, the list shows the last 14 days.
- **Filters:** **Recipient**, **From**, **Subject**, **Status**, **Tag**, **Created**, **Updated**, **Spam score**, **API key** and **Domain**. Combine several and choose whether all or any must match.
- **Columns:** **Recipient** is always shown. **Status**, **Subject**, **Type**, **Spam score**, **Sent** (the send or scheduled time), **Created** and **Updated** can be shown or hidden in **Display options** > **Edit columns**. The **Type** column and the **Tag** filter are usually empty for API and SMTP mail. To label emails so you can find them later, attach `meta` values when you send; they're included in every email event. See [Headers and metadata](/docs/email-api/headers-and-metadata/).
- **Row actions:** emails that are scheduled, accepted or attempted have a menu with **Cancel delivery**.

Select an email to open its [detail page](/docs/logs/email-details/): headers, content, attachments, every delivery attempt, opens, clicks, spam checks, and the **Forward**, **Cancel delivery** and **Retry** actions. Each status is explained in [Email statuses](/docs/logs/email-statuses/).

The **Compose** button sends a one-off email from the dashboard. See [Compose an email](/docs/logs/compose/).

## Logs

**Email API → Logs** is a request log for developers: every API v2 request and SMTP transaction authenticated with one of your API keys, whether it succeeded or failed. Use it to see exactly what your code sent and what Emailit answered. See [Request logs](/docs/logs/request-logs/).

## Events

**Email API → Events** lists the events Emailit records, such as `email.delivered`, `email.bounced` or `contact.created`. Every webhook request is built from these events, and you can read the same stream with the [Events API](/docs/api-reference/events/). See [Events](/docs/logs/events/).

## Retention

How long each record is kept depends on your plan and on the [Data retention](/docs/data-retention/) settings in **Workspace → Settings**:

- **Message contents** are the body, headers and attachments shown on the email detail page and returned by the content endpoints.
- **Message activity** is the email record itself, with its status, delivery attempts, opens and clicks. It's what the Emails list shows.
- **Logs** covers request logs, events and webhook requests.

| | Pay as you go | Pro | Business | Custom |
| --- | --- | --- | --- | --- |
| Message contents kept | 7 days | 30 days | 30 days | Flexible |
| Message activity kept | 30 days | 365 days | 365 days | Flexible |
| Request logs kept | 7 days | 30 days | 30 days | Flexible |

After contents are purged, the email stays in the list with its status and history, but the preview, attachments, **Forward** and **Retry** stop working. With the Data retention add-on you can set each window yourself, from 1 to 365 days.

## Next steps

  - [Email statuses](/docs/logs/email-statuses/): What each status means and what to do about it.
  - [Email details](/docs/logs/email-details/): Read delivery attempts, spam checks and engagement for one email.
  - [Request logs](/docs/logs/request-logs/): Debug API and SMTP errors.
  - [Events](/docs/logs/events/): The event stream behind webhooks.

---
Source: https://emailit.com/docs/logs/
