Mailboxes

List threads across your mailboxes

Lists only threads in mailboxes the caller can read, newest activity first.

GET
/v1/mailboxes/threads

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.

Authorization

apiKey
headerx-api-key<token>

Query Parameters

limit?|null
cursor?Cursor|null
after?string|null
before?string|null
q?string|null
state?|null
folder?|null
label?|null
unread?boolean|null
starred?boolean|null
snoozed?boolean|null
mailboxId?|array<>|null
kind?|null

Response Body

OrganizationMailboxThreadPage

application/json
  1. response
items*array<>
nextCursor*string|null
Example Request
import { 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"}

Related documentation