Get a mailbox thread
Returns a thread with its participants and where it stands.
GET
Returns a thread with its participants and where it stands. Read its messages with GET .../threads/{threadId}/messages and their bodies with GET .../threads/{threadId}/content.
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}$MailboxThread
application/json- response
id*MailboxThreadIdMatch
^thread_[0-9a-hjkmnp-tv-z]{16,24}$channel*MailboxChannelThe channel an endpoint, thread, or message belongs to.
Value in
"sms""whatsapp""email"endpointId*|nullsubject*string|nullpreview*string|nullfrom*|nullmessageCount*integerRange
0 <= value <= 9007199254740991hasAttachments*booleanhasDraft*booleanfolder*MailboxThreadFolderValue in
"inbox""assigned""pending""sent""archived""trash"priority*MailboxThreadPriorityValue in
"low""normal""high""urgent"labels*array<>read*booleanstarred*booleansnoozedUntil*string|nulldoneAt*string|nullclosedAt*string|nullclosedBy*|nulllastActivityAt*stringconversationId*ConversationIdMatch
^conv_[0-9a-hjkmnp-tv-z]{16,24}$participants*array<>whatsappServiceWindow*|nullcreatedAt*stringimport { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.mailboxes.getThread({
"id": "example",
"threadId": "example"
});Example Response
{
"id": "string",
"channel": "sms",
"endpointId": "string",
"subject": "string",
"preview": "string",
"from": {
"address": "string",
"displayName": "string"
},
"messageCount": 0,
"hasAttachments": true,
"hasDraft": true,
"folder": "inbox",
"priority": "low",
"labels": [
"string"
],
"read": true,
"starred": true,
"snoozedUntil": "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"
}