Skip to main content
Fetch Conversation Preview
Returns a single ConversationPreview — the same shape as one element of List Conversations. Use it to load a conversation the client does not already hold: one that was paginated out of the list, or one that was just created. Both this endpoint and the list are served by the same underlying query, so the two shapes stay identical.
This is distinct from Fetch Conversation, which returns a different shape — the conversation plus currentMember and memberCount. Reach for this endpoint when you are inserting a row into a conversation list, and for Fetch Conversation when you are opening a conversation.
Requires authentication. Acting-user-scoped: an end-user token (Authorization: Bearer <accessToken>) reads its own view of the conversation. A service key acts on behalf of a named user via the query actingUserId, which it must send; an end-user token must not send it. Requires the chat bundle. Membership is enforced by the query itself. A conversation the caller is not a member of, and a conversation that does not exist, both return 404 — no lastMessage, otherMembers or unreadCount is exposed in either case.

Path Parameters

string
required
UUID of the conversation to fetch.

Query Parameters

string
Service key only, and required with one: the user this request acts as. Must be a member of the conversation; the preview shows their view of it. A user token always acts as its own user and must not send it (400 chat/acting-user-not-allowed).

Response

Returns a Conversation extended with the following fields.
number
Number of unread messages in this conversation for the acting user.
number
Number of currently active members.
ChatMessage | null
The most recent visible top-level message in the conversation (thread replies are never the last message), with its content truncated to 100 characters and its files populated. Deleted and moderated-away messages are excluded, so this is null when the conversation has no visible messages — including a group or space conversation whose only messages have since been removed.
string | null
ISO timestamp until which the acting user has muted this conversation. null when the conversation is not muted, and also when it is muted forever.
boolean
Whether the acting user has muted this conversation indefinitely. A forever mute returns mutedForever: true with mutedUntil: null — the far-future storage sentinel is never exposed as a date. Read the boolean; never string-match a date.
object[]
Up to 5 active members other than the acting user, each with public user fields (id, name, username, avatar). Populated for direct and group conversations only — a DM or group has no name, so the counterparty is how a client renders the title and avatar. Capped at 5; use memberCount for the full group total. Always an empty array ([]) for space conversations, which carry their own name. Ordered by member join time.

Error Responses

A user token sent actingUserId, even naming its own user. Only a service key names the user it acts as; a user token always acts as its own user.
Returned when a service key names an actingUserId that isn’t a user in this project.
The request sent userId. On this route the user a service key acts as is actingUserId.With a service key:
With a user token, or with no credentials:
A service key sent no actingUserId.
Returned both when the conversation does not exist and when the acting user is not a member of it.