Get the mailbox thread reader
Returns thread detail and up to 20 entries each for messages with bodies, notes, and actions, including pending approvals, from one snapshot.
GET
Returns thread detail and up to 20 entries each for messages with bodies, notes, and actions, including pending approvals, from one snapshot. Each collection has its own nextCursor. Continue messages on the thread's content endpoint, notes on its notes endpoint, and actions on the mailbox's actions endpoint with the same threadId. Callers without permission to list actions receive an empty action page. Action receipts reflect stored send state. Read an individual action to check live retry eligibility.
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}$MailboxThreadReader
application/json- response
detail*messages*notes*actions*import { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.mailboxes.getThreadReader({
"id": "example",
"threadId": "example"
});Example Response
{
"detail": {
"id": "string",
"channel": "sms",
"endpointId": "string",
"deliveredTo": "string",
"subject": "string",
"preview": "string",
"from": {
"address": "string",
"displayName": "string"
},
"messageCount": 0,
"hasAttachments": true,
"hasDraft": true,
"folder": "inbox",
"spam": {
"reason": "spam",
"source": "receipt"
},
"priority": "low",
"labels": [
"string"
],
"read": true,
"starred": true,
"snoozedUntil": "string",
"reminderSetAt": "string",
"reminderInboxAt": "string",
"doneAt": "string",
"closedAt": "string",
"closedBy": {
"kind": "user",
"id": "string",
"displayName": "string"
},
"lastActivityAt": "string",
"conversationId": "string",
"participants": [
{
"actor": {
"kind": "user",
"id": "string",
"displayName": "string"
},
"role": "recipient",
"address": "string"
}
],
"whatsappServiceWindow": {
"open": true,
"expiresAt": "string"
},
"createdAt": "string"
},
"messages": {
"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"
},
"notes": {
"items": [
{
"id": "string",
"author": {
"kind": "user",
"id": "string",
"displayName": "string"
},
"body": "string",
"color": "string",
"pinned": true,
"createdAt": "string",
"updatedAt": "string"
}
],
"nextCursor": "string"
},
"actions": {
"items": [
{
"id": "string",
"source": "humanUi",
"proposedBy": {
"kind": "user",
"id": "string",
"displayName": "string"
},
"threadId": "string",
"draftId": "string",
"decision": {
"id": "string",
"reviewRound": 1,
"requirement": "run",
"decider": "rule",
"outcome": "allow",
"reason": "string",
"scopes": [
{
"kind": "organization",
"id": "string"
}
],
"rule": {
"scope": {
"kind": "organization",
"id": "string"
},
"index": 0
},
"guard": "string",
"guardReason": "string",
"resolution": {
"by": "string",
"at": "string",
"as": "approved",
"diff": {
"text": {
"before": "string",
"after": "string"
},
"html": {
"before": "string",
"after": "string"
}
}
}
},
"resolution": {
"outcome": "approved",
"actor": {
"kind": "user",
"id": "string",
"displayName": "string",
"source": "humanUi"
},
"resolvedAt": "string",
"reason": "string"
},
"alwaysAllow": {
"by": "owner",
"allowed": true
},
"createdAt": "string",
"updatedAt": "string",
"type": "sendMessage",
"state": "approvalRequired",
"send": {
"actionId": "string",
"draftId": "string",
"messageId": "string",
"threadId": "string",
"state": "approvalRequired",
"acceptedAt": "string",
"waitReason": "rate",
"reviewExpectedAt": "string",
"skippedRecipients": [
{
"address": "string",
"reason": "bounce",
"topicId": "string"
}
],
"executeUntil": "string",
"retryAt": "string",
"problem": {
"code": "string",
"message": "string",
"error": {
"_tag": "SenderNotReadyError",
"message": "string",
"sender": "string",
"retryAfterSeconds": 0
}
},
"retryEligible": true,
"decision": {
"id": "string",
"reviewRound": 1,
"requirement": "run",
"decider": "rule",
"outcome": "allow",
"reason": "string",
"scopes": [
{
"kind": "organization",
"id": "string"
}
],
"rule": {
"scope": {
"kind": "organization",
"id": "string"
},
"index": 0
},
"guard": "string",
"guardReason": "string",
"resolution": {
"by": "string",
"at": "string",
"as": "approved",
"diff": {
"text": {
"before": "string",
"after": "string"
},
"html": {
"before": "string",
"after": "string"
}
}
}
},
"createdAt": "string",
"updatedAt": "string"
},
"intent": {
"channel": "email",
"draftRevision": 1,
"from": "string",
"fromName": "string",
"to": [
"string"
],
"cc": [
"string"
],
"bcc": [
"string"
],
"replyTo": [
"string"
],
"subject": "string",
"text": "string",
"html": "string",
"attachments": [
{
"filename": "string",
"content": "string",
"mediaId": "string",
"contentType": "string",
"size": 1
}
],
"threadId": "string",
"conversationId": "string",
"inReplyToMessageId": "string"
}
}
],
"nextCursor": "string"
}
}