Mailboxes
List drafts
Returns summaries of the caller's unsent drafts in the mailbox, newest first, optionally for one thread.
GET
Returns summaries of the caller's unsent drafts in the mailbox, newest first, optionally for one thread. Pass nextCursor back as cursor for the next page; it is null on the last page. Read a draft's body with GET /v1/mailboxes/{id}/drafts/{draftId}.
apiKeyheader
x-api-key<token>id*stringMatch
^mbx_[0-9a-hjkmnp-tv-z]{16,24}$limit?|nullcursor?stringthreadId?stringMatch
^thread_[0-9a-hjkmnp-tv-z]{16,24}$MailboxDraftPage
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.listDrafts({ "id": "example"});Example Response
{ "items": [ { "id": "string", "channel": "sms", "threadId": "string", "inReplyToMessageId": "string", "state": "saved", "lockedByActionId": "string", "to": [ "string" ], "subject": "string", "createdAt": "string", "updatedAt": "string" } ], "nextCursor": "string"}