---
title: "Email"
description: "The `Email` entity."
section: "Reference"
group: "Types"
order: 78
---

## Definition

```ts
interface Email {
  id: string;
  workspaceId: string;
  messageId: string | null;
  inReplyTo: string | null;
  references: string | null;
  subject: string | null;
  from: { name: string; address: string } | null;
  sender: { name: string; address: string } | null;
  to: Array<{ name: string; address: string }>;
  cc: Array<{ name: string; address: string }>;
  bcc: Array<{ name: string; address: string }>;
  replyTo: Array<{ name: string; address: string }>;
  date: string | null;
  bodyPreview: string;
  bodyPreviewTruncated: boolean;
  rawSize: number;
  attachmentCount: number;
  receivedAt: string;
  createdAt: string;
  updatedAt: string;
}
```

## Fields

| Field                  | Type                                         | Notes                                                                            |
| ---------------------- | -------------------------------------------- | -------------------------------------------------------------------------------- |
| `id`                   | `string`                                     | `readonly` `required`                                                            |
| `workspaceId`          | `string`                                     | `required` — Workspace that received this email.                                 |
| `messageId`            | `string \| null`                             | `required` — RFC-5322 Message-ID header value.                                   |
| `inReplyTo`            | `string \| null`                             | `required` — Message-ID of the email this one replies to, if any.                |
| `references`           | `string \| null`                             | `required` — Space-separated list of referenced Message-IDs for threading.       |
| `subject`              | `string \| null`                             | `required` — Subject header, if present.                                         |
| `from`                 | `{ name: string; address: string; } \| null` | `required` — Author per the From header.                                         |
| `sender`               | `{ name: string; address: string; } \| null` | `required` — Actual sender per the Sender header, if it differs from From.       |
| `to`                   | `Array<{ name: string; address: string; }>`  | `required` — Primary recipients (To header).                                     |
| `cc`                   | `Array<{ name: string; address: string; }>`  | `required` — Carbon-copy recipients (Cc header).                                 |
| `bcc`                  | `Array<{ name: string; address: string; }>`  | `required` — Blind-carbon-copy recipients (Bcc header), if exposed by transport. |
| `replyTo`              | `Array<{ name: string; address: string; }>`  | `required` — Addresses clients should reply to (Reply-To header).                |
| `date`                 | `string \| null`                             | `required` — Date header parsed as ISO-8601; null when missing or invalid.       |
| `bodyPreview`          | `string`                                     | `required` — Plaintext preview snippet of the email body.                        |
| `bodyPreviewTruncated` | `boolean`                                    | `required` — True when the preview is truncated vs. the full body.               |
| `rawSize`              | `number`                                     | `required` — Size in bytes of the raw .eml payload stored in R2.                 |
| `attachmentCount`      | `number`                                     | `required` — Number of attachments parsed from the message.                      |
| `receivedAt`           | `string`                                     | `required` — ISO-8601 timestamp when the email worker received the message.      |
| `createdAt`            | `string`                                     | `readonly` `required` — ISO-8601 timestamp of creation.                          |
| `updatedAt`            | `string`                                     | `readonly` `required` — ISO-8601 timestamp of the last update.                   |
