Fastmail icon

Fastmail

Actions for Fastmail messages, labels, drafts and threads

Thread → Get Many Threads

AI-generated

Summary

Fetch multiple thread summaries from Fastmail mailboxes.

Inputs

  • limit — Maximum number of thread results to return (default 50).
  • mailboxScope — Scope of mailboxes to search: 'all' for all mailboxes or 'specific' to limit to one mailbox.
  • filterLabelId (required) — Label name or ID to filter threads. Required when mailboxScope is 'specific'.
  • fetchOptions — Additional fetch options controlling search, read status, body inclusion, attachment handling, etc.

Output shape

An array of thread summary objects, each containing id, messageCount, unreadCount, latestMessageSubject, latestMessageFrom, latestMessageAt, latestMessagePreview, and optionally emailIds when includeEmailIds is true.

Results are limited by the provided limit; if mailboxScope is 'specific' a filterLabelId must be supplied; includeEmailIds can add the thread's email IDs to the output; pagination is not supported beyond the limit parameter.

Examples

Example 1: Retrieve up to 10 threads from the 'Invoices' mailbox

resource=thread, operation=getMany, limit=10, mailboxScope=specific, filterLabelId='Invoices'

Example 2: Fetch all threads across all mailboxes with default limit

resource=thread, operation=getMany, limit=50, mailboxScope=all

Example 3: Search for threads containing the word 'invoice' and mark them as read

resource=thread, operation=getMany, limit=25, mailboxScope=all, fetchOptions.search='invoice', fetchOptions.readStatus='read'

Links

Discussion