List threads across your mailboxes
Lists only threads in mailboxes the caller can read.
Lists only threads in mailboxes the caller can read. With q, semantic and keyword search returns the best-matching threads in relevance order, capped across cursor pages. Without q, threads use 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.
apiKeyx-api-key<token>limit?|nullcursor?stringafter?stringbefore?stringq?stringSearch subjects, participants, message text, and attachment filenames by semantic and keyword relevance. Filters narrow the search. Returns up to 100 best-matching threads across cursor pages; omit q to list by recent activity. New mail can take a few seconds to become searchable. Attachment contents are not searched.
state?string"active""done"folder?string"inbox""assigned""pending""sent""archived""trash"label?string^label_[0-9a-hjkmnp-tv-z]{16,24}$unread?boolean|nullstarred?boolean|nullsnoozed?boolean|nullmailboxId?|array<>kind?string"personal""shared"conversation?string^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({});{
"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"
}