Mailboxes
Get a draft
Returns one of the caller's drafts, or the draft of a send waiting for approval when the caller may approve it.
GET
Returns one of the caller's drafts, or the draft of a send waiting for approval when the caller may approve it.
apiKeyheader
x-api-key<token>id*stringMatch
^mbx_[0-9a-hjkmnp-tv-z]{16,24}$draftId*stringMatch
^mdraft_[0-9a-hjkmnp-tv-z]{16,24}$MailboxDraft
application/json- response
id*MailboxDraftIdMatch
^mdraft_[0-9a-hjkmnp-tv-z]{16,24}$channel*"email"Value in
"email"threadId*|nullinReplyToMessageId*|nullstate*MailboxDraftStateValue in
"saved""locked""sent"lockedByActionId*|nullto*array<string>subject*string|nullcreatedAt*stringupdatedAt*stringendpointId*|nullcc*array<string>bcc*array<string>replyTo*array<string>html*string|nulltext*string|nullattachments*array<>Items
items <= 10import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.mailboxes.getDraft({ "id": "example", "draftId": "example"});Example Response
{ "id": "string", "channel": "email", "threadId": "string", "inReplyToMessageId": "string", "state": "saved", "lockedByActionId": "string", "to": [ "string" ], "subject": "string", "createdAt": "string", "updatedAt": "string", "endpointId": "string", "cc": [ "string" ], "bcc": [ "string" ], "replyTo": [ "string" ], "html": "string", "text": "string", "attachments": [ { "filename": "string", "content": "string", "mediaId": "string", "contentType": "string", "size": 1 } ]}