Mailboxes

Get a mailbox thread

Returns a thread with its participants and where it stands.

GET
/v1/mailboxes/{id}/threads/{threadId}

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.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

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

Response Body

MailboxThread

application/json
  1. response
id*MailboxThreadId
Match^thread_[0-9a-hjkmnp-tv-z]{16,24}$
channel*MailboxChannel

The channel an endpoint, thread, or message belongs to.

Value in"sms""whatsapp""email"
endpointId*|null
subject*string|null
preview*string|null
from*|null
messageCount*integer
Range0 <= value <= 9007199254740991
hasAttachments*boolean
hasDraft*boolean
folder*MailboxThreadFolder
Value in"inbox""assigned""pending""sent""archived""trash"
priority*MailboxThreadPriority
Value in"low""normal""high""urgent"
labels*array<>
read*boolean
starred*boolean
snoozedUntil*string|null
doneAt*string|null
closedAt*string|null
closedBy*|null
lastActivityAt*string
conversationId*ConversationId
Match^conv_[0-9a-hjkmnp-tv-z]{16,24}$
participants*array<>
whatsappServiceWindow*|null
createdAt*string
Example Request
import { 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"}

Related documentation