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. conversation selects the threads of one conversation (the conversationId a thread reports), one per readable mailbox it reached. 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?stringafter?stringbefore?stringq?stringstate?stringValue in
"active""done"folder?stringValue in
"inbox""assigned""pending""sent""archived""trash"label?stringMatch
^label_[0-9a-hjkmnp-tv-z]{16,24}$unread?boolean|nullstarred?boolean|nullsnoozed?boolean|nullmailboxId?|array<>kind?stringValue in
"personal""shared"conversation?stringMatch
^conv_[0-9a-hjkmnp-tv-z]{16,24}$OrganizationMailboxThreadPage
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": "sms", "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"}