Mailboxes
Get a mailbox message
Returns a message in the mailbox, discriminated by `channel`.
GET
Returns a message in the mailbox, discriminated by channel. An email has its text, sanitized HTML, replyText (what the sender wrote, without quoted history), authentication verdicts, and attachments.
apiKeyheader
x-api-key<token>id*stringMatch
^mbx_[0-9a-hjkmnp-tv-z]{16,24}$messageId*stringMatch
^msg_[0-9a-hjkmnp-tv-z]{16,24}$MailboxMessage
application/json- response
id*MessageIdMatch
^msg_[0-9a-hjkmnp-tv-z]{16,24}$campaign?|nullthreadId*MailboxThreadIdMatch
^thread_[0-9a-hjkmnp-tv-z]{16,24}$conversationId*ConversationIdMatch
^conv_[0-9a-hjkmnp-tv-z]{16,24}$direction*stringValue in
"inbound""outbound"from*sentBy?|nulloccurredAt*stringchannel*"email"Value in
"email"recipients*array<>replyTo*array<string>subject?string|nulltext?string|nullhtml?string|nullreplyText?string|nullheaders*authentication*|nullattachments*array<>import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.mailboxes.getMessage({ "id": "example", "messageId": "example"});Example Response
{ "id": "string", "campaign": { "campaignId": "string", "runId": "string" }, "threadId": "string", "conversationId": "string", "direction": "inbound", "from": { "actor": { "kind": "user", "id": "string", "displayName": "string" }, "displayName": "string", "address": "string" }, "sentBy": { "kind": "user", "id": "string", "displayName": "string" }, "occurredAt": "string", "channel": "email", "recipients": [ { "kind": "to", "actor": { "kind": "user", "id": "string", "displayName": "string" }, "displayName": "string", "address": "string" } ], "replyTo": [ "string" ], "subject": "string", "text": "string", "html": "string", "replyText": "string", "headers": { "messageId": "string", "inReplyTo": "string", "references": [ "string" ] }, "authentication": { "spf": "string", "dkim": "string", "dmarc": "string" }, "attachments": [ { "id": "string", "filename": "string", "contentType": "string", "size": 0, "isInline": true } ]}