Conversations

List conversation messages

Returns the conversation's message summaries, oldest first.

GET
/v1/conversations/{id}/messages

Returns the conversation's message summaries, oldest first. Pass nextCursor back as cursor for the next page; it is null on the last page. Read a message's content with GET /v1/messages/{id}/content.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

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

Query Parameters

limit?|null
cursor?string
after?string
before?string

Response Body

MessagePage

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.conversations.listMessages({  "id": "example"});
Example Response
{  "items": [    {      "id": "string",      "campaign": {        "campaignId": "string",        "runId": "string"      },      "channel": "sms",      "direction": "outbound",      "status": "pending",      "from": "string",      "to": [        "string"      ],      "subject": "string",      "waitReason": "rate",      "createdAt": "string"    }  ],  "nextCursor": "string"}

Related documentation