Mailboxes

Get a mailbox message

Returns a message in the mailbox, discriminated by `channel`.

GET
/v1/mailboxes/{id}/messages/{messageId}

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.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

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

Response Body

MailboxMessage

application/json
  1. response
id*MessageId
Match^msg_[0-9a-hjkmnp-tv-z]{16,24}$
campaign?|null
threadId*MailboxThreadId
Match^thread_[0-9a-hjkmnp-tv-z]{16,24}$
conversationId*ConversationId
Match^conv_[0-9a-hjkmnp-tv-z]{16,24}$
direction*string
Value in"inbound""outbound"
from*
sentBy?|null
occurredAt*string
channel*"email"
Value in"email"
recipients*array<>
replyTo*array<string>
subject?string|null
text?string|null
html?string|null
replyText?string|null
headers*
authentication*|null
attachments*array<>
Example Request
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    }  ]}

Related documentation