Mailboxes

List drafts

Returns summaries of the caller's unsent drafts in the mailbox, newest first, optionally for one thread.

GET
/v1/mailboxes/{id}/drafts

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}.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^mbx_[0-9a-hjkmnp-tv-z]{16,24}$

Query Parameters

limit?|null
cursor?string
threadId?string
Match^thread_[0-9a-hjkmnp-tv-z]{16,24}$

Response Body

MailboxDraftPage

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.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"}

Related documentation