Mailboxes

List your drafts across mailboxes

Lists only the caller's own unsent drafts in mailboxes where they may write drafts, newest first.

GET
/v1/mailboxes/drafts

Lists only the caller's own unsent drafts in mailboxes where they may write drafts, newest first. Repeat mailboxId to narrow the scope; kind selects personal or shared mailboxes and threadId narrows to one thread. Each row carries its mailbox identity. Teammates' and agents' drafts are excluded. Pass nextCursor as cursor for the next page.

Authorization

apiKey
headerx-api-key<token>

Query Parameters

limit?|null
cursor?string
mailboxId?|array<>
kind?string
Value in"personal""shared"
threadId?string
Match^thread_[0-9a-hjkmnp-tv-z]{16,24}$

Response Body

OrganizationMailboxDraftPage

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.listOrganizationDrafts({});
Example Response
{  "items": [    {      "id": "string",      "channel": "sms",      "threadId": "string",      "inReplyToMessageId": "string",      "state": "saved",      "lockedByActionId": "string",      "to": [        "string"      ],      "subject": "string",      "createdAt": "string",      "updatedAt": "string",      "mailbox": {        "id": "string",        "address": "string",        "kind": "personal"      }    }  ],  "nextCursor": "string"}

Related documentation