Conversations are member-mode: every call here uses the short-lived member
token your backend mints, not the Org-API-Key. See
Authentication for the two-token model and refresh contract.
Stream live messages
Subscribe to new concierge messages over SSE, consumed as an
AsyncIterable,
AsyncStream, or Flow. The right way to receive incoming messages.The flow
List the member’s conversations, read a thread’s history, then send a reply:Operations
| Operation | SDK method | Returns |
|---|---|---|
| List conversations | listConversations({ externalUserID? }) | { conversations: Conversation[] } |
| List messages | listMessages(id, { limit?, cursor?, externalUserID? }) | { messages: Message[], nextCursor } |
| Send a message | sendMessage(id, message) | { ok } |
List conversations
GET /v1/conversations returns the member’s conversations.
Names the member when a machine token calls on their behalf.
ListConversationsResponse:
The member’s conversations.
List messages
GET /v1/conversations/{id}/messages returns one page of a conversation’s
messages with cursor pagination.
The conversation id.
Page size. Defaults to the server’s default if omitted.
The
nextCursor from the previous page. Omit for the first page.Names the member when a machine token calls on their behalf.
ListMessagesResponse:
The page of messages.
Pass this back as
cursor to fetch the next page. null marks the end of the
history.Send a message
POST /v1/conversations/{id}/messages posts a message to the conversation.
The conversation id.
The message text to send.
SendMessageResponse:
true when the message was accepted.Idempotency on
sendMessage is supported via the Idempotency-Key
header - a retried send replays rather than double-posting. The
API reference omits the header on the
{id} route because of an emitter limitation, not because it is unsupported,
so set the header yourself when retrying. The SDKs send one automatically on
every write. See Retries and idempotency.Schemas
Conversation
| Field | Type | Meaning |
|---|---|---|
id | string | The conversation id. Use it for listMessages and sendMessage. |
type | string | The conversation kind. |
title | string | null | A display title. May be null for untitled threads. |
lastMessageAt | string | null | ISO-8601 time of the most recent message, or null if empty. Useful for sorting threads. |
Message
| Field | Type | Meaning |
|---|---|---|
id | string | The message id. |
type | string | The message kind. |
authorID | string | Identifies the sender. Compare it against the member to tell incoming from outgoing. |
body | string | null | The message text. May be null (for example, a non-text or system message). |
createdAt | string | ISO-8601 timestamp. |
Related
Streaming messages
Receive live incoming messages over SSE.
Errors
The error taxonomy and stable codes for failed calls.