# MessageUpdated

The MessageUpdated type of the TypeScript SDK, part of MessageUpdateResult.

```ts
type MessageUpdated = {
  auth: MessageAuth
  bcc: ContentAddress[] | null
  blobGen: string
  blobHash: string
  cc: ContentAddress[] | null
  deliveryMeta: Record<string, unknown> | null
  deliveryState: ('queued' | 'relayed' | 'delivered' | 'failed' | 'mixed') | null
  envelopeFrom: string
  envelopeTo: string
  flags: string[]
  from: ContentAddress[] | null
  hasAttachment: boolean | null
  id: string
  inReplyTo: string | null
  keywords: string[]
  labels: MessageLabel[]
  labelsAdded?: string[]
  labelsRemoved?: string[]
  messageIdHeader: string | null
  modseq?: number
  receivedAt: number
  referencesIds: string[]
  restoresTo?: string[] | null
  sentAt: number | null
  size: number
  snippet: string | null
  subject: string | null
  threadId: string | null
  to: ContentAddress[] | null
  uid?: number
}
```

## Fields

| Field | Type | Description |
| --- | --- | --- |
| `auth` | [`MessageAuth`](/docs/sdks/typescript/types/message-auth) |  |
| `bcc` | [`ContentAddress[]`](/docs/sdks/typescript/types/content-address) \| `null` | Parsed Bcc header addresses for composed drafts, or null |
| `blobGen` | `string` | Storage generation identifier |
| `blobHash` | `string` | SHA-256 hash of raw MIME content in storage |
| `cc` | [`ContentAddress[]`](/docs/sdks/typescript/types/content-address) \| `null` | Parsed Cc header addresses, or null if unparseable |
| `deliveryMeta` | `Record<string, unknown> \| null` | Inbound delivery audit metadata |
| `deliveryState` | `('queued' \| 'relayed' \| 'delivered' \| 'failed' \| 'mixed') \| null` | What became of this message after it was SENT, for a message this mailbox sent: 'queued' (handed to the relay), 'relayed' (the receiving mail system accepted it — never 'read'), 'delivered' (committed to a local mailbox), 'failed', or 'mixed' (some recipients failed, others did not). Null for received mail, and for sent mail whose delivery record has aged out — render null as no indicator, never as a state. Per-recipient detail and the SMTP reply behind a failure are at /messages/\{messageId\}/delivery. |
| `envelopeFrom` | `string` | SMTP envelope sender address |
| `envelopeTo` | `string` | SMTP envelope recipient address |
| `flags` | `string[]` | System flags (seen, answered, flagged, draft, deleted) |
| `from` | [`ContentAddress[]`](/docs/sdks/typescript/types/content-address) \| `null` | Parsed From header addresses, or null if unparseable |
| `hasAttachment` | `boolean` \| `null` | True if message has file attachments, null if not yet determined |
| `id` | `string` | Unique message identifier (ULID) |
| `inReplyTo` | `string` \| `null` | In-Reply-To header Message-ID, or null |
| `keywords` | `string[]` | Custom JMAP keywords (e.g. $forwarded) |
| `labels` | [`MessageLabel[]`](/docs/sdks/typescript/types/message-label) | Labels attached to this message with per-label UIDs |
| `labelsAdded` | `string[]` | Optional. Labels this write attached, including an Archive fallback under `orphans` |
| `labelsRemoved` | `string[]` | Optional. Labels this write detached |
| `messageIdHeader` | `string` \| `null` | Message-ID header value, or null |
| `modseq` | `number` | Optional. Per-label MODSEQ (present in label UID listings) |
| `receivedAt` | `number` | Timestamp when message was received by server in epoch seconds |
| `referencesIds` | `string[]` | List of Message-IDs from References header |
| `restoresTo` | `string[]` \| `null` | Optional. Where a recovery would file this message, as label names. Present only when the message is recoverable: one carrying the Trash label (POST /messages/untrash), one carrying the Junk label with a recorded origin (POST /messages/unjunk), or one on the expunged tier (POST /messages/restore). A message in both Trash and Junk's records answers for Trash, the verb a client offers it first. Null otherwise, meaning the message is filed rather than recoverable. This is the effective destination including the Inbox fallback, not a raw snapshot, so a client can name it on a Put back or Not spam control without reimplementing the rule. |
| `sentAt` | `number` \| `null` | Sent timestamp from Date header in epoch seconds, or null |
| `size` | `number` | Total message size in bytes |
| `snippet` | `string` \| `null` | Short plain-text preview of message body |
| `subject` | `string` \| `null` | Message subject line, or null |
| `threadId` | `string` \| `null` | Conversation thread identifier (ULID), or null |
| `to` | [`ContentAddress[]`](/docs/sdks/typescript/types/content-address) \| `null` | Parsed To header addresses, or null if unparseable |
| `uid` | `number` | Optional. Per-label UID (present in label UID listings) |

## Used in

[`MessageUpdateResult`](/docs/sdks/typescript/types/message-update-result).
