MessageMeta
The MessageMeta type of the TypeScript SDK, which labels.listMessages and 5 more methods take or answer.
type MessageMeta = {
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[]
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 | |
bcc | ContentAddress[] | 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[] | 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[] | 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[] | Labels attached to this message with per-label UIDs |
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[] | null | Parsed To header addresses, or null if unparseable |
uid | number | Optional. Per-label UID (present in label UID listings) |
Used by
| Method | What it does |
|---|---|
labels.listMessages | List messages in a label by UID |
messages.list | List mailbox messages |
messages.get | Get message metadata |
search.fullText | Full-text search a mailbox |
search.semantic | Semantic (meaning-based) search of a mailbox |
threads.get | Get a conversation thread |
Used in
BatchRestoreEntry, BatchUnjunkEntry, BatchUntrashEntry, BatchUpdateEntry, EmailSearchResult, ExpungedMessageMeta, MessageBatch, MessageRestoreResult, SemanticSearchResult, SimilarMessagesResult, ThreadListItem, ThreadView.