Mailboxes

List messages in a mailbox thread

Returns the thread's message summaries, oldest first.

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

Returns the thread's message summaries, oldest first. Pass nextCursor back as cursor for the next page; it is null on the last page. Read the bodies with GET .../threads/{threadId}/content or one message with GET /v1/mailboxes/{id}/messages/{messageId}.

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}$

Query Parameters

limit?|null
cursor?string

Response Body

MailboxMessagePage

application/json
  1. response
items*array<>
nextCursor*string|null
Example Request
import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.mailboxes.listThreadMessages({  "id": "example",  "threadId": "example"});
Example Response
{  "items": [    {      "id": "string",      "campaign": {        "campaignId": "string",        "runId": "string"      },      "channel": "sms",      "direction": "inbound",      "from": {        "actor": {          "kind": "user",          "id": "string",          "displayName": "string"        },        "displayName": "string",        "address": "string"      },      "to": [        "string"      ],      "subject": "string",      "preview": "string",      "hasAttachments": true,      "occurredAt": "string"    }  ],  "nextCursor": "string"}

Related documentation