Read a mailbox thread
Read a mailbox thread. Request: GET /v1/mailboxes/{id}/threads/{threadId}/content. Scope: mailboxes:read.
GET
Returns the thread's messages with their text, sanitized HTML, replyText (what each sender wrote, without quoted history), authentication verdicts, and attachments, oldest first. Pass nextCursor back as cursor for the next page; it is null on the last page.
apiKeyheader
x-api-key<token>id*stringMatch
^mbx_[0-9a-hjkmnp-tv-z]{16,24}$threadId*stringMatch
^thread_[0-9a-hjkmnp-tv-z]{16,24}$limit?|nullcursor?stringMailboxThreadContentPage
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.getThreadContent({
"id": "example",
"threadId": "example"
});Example Response
{
"items": [
{
"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
}
]
}
],
"nextCursor": "string"
}