Mailboxes
List threads across your mailboxes
Lists only threads in mailboxes the caller can read, newest activity first.
GET
Lists only threads in mailboxes the caller can read, newest activity first. Repeat mailboxId to narrow the scope; kind selects personal or shared mailboxes. state=active excludes the caller's Done and shared closed threads; state=done selects the caller's Done plus closed shared threads, without duplicates. Other filters and cursor pagination match the per-mailbox list.
apiKeyheader
x-api-key<token>limit?|nullcursor?Cursor|nullafter?string|nullbefore?string|nullq?string|nullstate?|nullfolder?|nulllabel?|nullunread?boolean|nullstarred?boolean|nullsnoozed?boolean|nullmailboxId?|array<>|nullkind?|nullOrganizationMailboxThreadPage
application/json- response
items*array<>nextCursor*string|nullimport { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.mailboxes.listOrganizationThreads({});Example Response
{ "items": [ { "id": "string", "channel": "email", "endpointId": "string", "subject": "string", "preview": "string", "from": { "address": "string", "displayName": "string" }, "messageCount": 0, "hasAttachments": true, "hasDraft": true, "folder": "inbox", "priority": "low", "labels": [ "string" ], "read": true, "starred": true, "snoozedUntil": "string", "doneAt": "string", "closedAt": "string", "closedBy": { "kind": "user", "id": "string", "displayName": "string" }, "lastActivityAt": "string", "mailbox": { "id": "string", "address": "string", "kind": "personal" } } ], "nextCursor": "string"}