Livqeno Docs

Chat API

Conversations, members, messages, reactions, receipts, presence, and attachments.

The chat surface accepts two credentials and behaves differently for each. A project API key acts as a server — full scopes, may act for any user in the project. A chat token acts as one client — its identity and scopes come from the signature and the request body cannot widen either.

See Chat authentication for what that means in practice.

Endpoints

MethodPathCredential
POST/v1/chat/attachments/{attachmentId}/completeProject API key or chat token
GET/v1/chat/attachments/{attachmentId}/download-urlProject API key or chat token
GET/v1/chat/conversationsProject API key or chat token
POST/v1/chat/conversationsProject API key or chat token
GET/v1/chat/conversations/{room}Project API key or chat token
PATCH/v1/chat/conversations/{room}Project API key or chat token
POST/v1/chat/conversations/{room}/attachmentsProject API key or chat token
GET/v1/chat/conversations/{room}/membersProject API key or chat token
POST/v1/chat/conversations/{room}/membersProject API key or chat token
DELETE/v1/chat/conversations/{room}/members/{userId}Project API key or chat token
GET/v1/chat/conversations/{room}/messagesProject API key or chat token
POST/v1/chat/conversations/{room}/messagesProject API key or chat token
GET/v1/chat/conversations/{room}/presenceProject API key or chat token
GET/v1/chat/conversations/{room}/read-receiptsProject API key or chat token
GET/v1/chat/conversations/{room}/read-stateProject API key or chat token
GET/v1/chat/conversations/{room}/typingProject API key or chat token
DELETE/v1/chat/messages/{messageId}Project API key or chat token
GET/v1/chat/messages/{messageId}Project API key or chat token
PATCH/v1/chat/messages/{messageId}Project API key or chat token
POST/v1/chat/messages/{messageId}/reactionsProject API key or chat token
DELETE/v1/chat/messages/{messageId}/reactions/{emoji}Project API key or chat token
POST/v1/chat/messages/{messageId}/readProject API key or chat token
GET/v1/chat/messages/{messageId}/threadProject API key or chat token
POST/v1/chat/tokensProject API key or chat token
GET/v1/projects/{projectId}/chat/connectionsDashboard session (JWT)
GET/v1/projects/{projectId}/chat/conversationsDashboard session (JWT)
GET/v1/projects/{projectId}/chat/conversations/{conversationId}Dashboard session (JWT)
GET/v1/projects/{projectId}/chat/conversations/{conversationId}/membersDashboard session (JWT)
GET/v1/projects/{projectId}/chat/conversations/{conversationId}/messagesDashboard session (JWT)
GET/v1/projects/{projectId}/chat/conversations/{conversationId}/presenceDashboard session (JWT)
GET/v1/projects/{projectId}/chat/overviewDashboard session (JWT)

POST /v1/chat/attachments/{attachmentId}/complete

Confirm the upload finished, making the attachment sendable

Credential Project API key or chat token

ParameterInTypeRequiredNotes
attachmentIdpathstringYes

GET /v1/chat/attachments/{attachmentId}/download-url

Short-lived signed download URL for an attachment you can see

Credential Project API key or chat token

ParameterInTypeRequiredNotes
attachmentIdpathstringYes

GET /v1/chat/conversations

List the project's conversations

Credential Project API key or chat token

No parameters.

POST /v1/chat/conversations

Create a conversation, optionally attached to an RTC room

Credential Project API key or chat token

ParameterInTypeRequiredNotes
namebodystringYes1–128 chars, pattern-checked — Unique within the project. Doubles as a human-readable handle for chat.connect().
typebodyConversationTypeNoIgnored when roomId is set — attaching an RTC room always produces a ROOM conversation.
roomIdbodystringNoAttach this conversation to an existing RTC room, giving that video call a chat panel.
retentionDaysbodynumberNo1–3650 — Overrides CHAT_RETENTION_DAYS for this conversation.
membersbodyConversationMemberDto[]Noarray
metadatabodyRecord<string, unknown>NoArbitrary developer-owned JSON. Size-capped like message metadata.

GET /v1/chat/conversations/{room}

Get one conversation by conv_ id, uuid, RTC room id, or name

Credential Project API key or chat token

ParameterInTypeRequiredNotes
roompathstringYes

PATCH /v1/chat/conversations/{room}

Rename, archive, or re-configure retention for a conversation

Credential Project API key or chat token

ParameterInTypeRequiredNotes
roompathstringYes
namebodystringNo1–128 chars, pattern-checked
statusbodyConversationStatusNo
retentionDaysbodynumberNo1–3650
metadatabodyRecord<string, unknown>No

POST /v1/chat/conversations/{room}/attachments

Get a signed upload URL

Credential Project API key or chat token

ParameterInTypeRequiredNotes
roompathstringYes
filenamebodystringYes1–255 chars
mimeTypebodystringYes0–255 chars, pattern-checked
sizebodynumberYes1–1024 — Declared size in bytes, checked against STORAGE_MAX_ATTACHMENT_BYTES before a URL is issued.
uploaderIdbodystringNo0–128 chars — API-key callers only — ignored for browser chat tokens.
metadatabodyRecord<string, unknown>NoDeveloper-owned JSON, e.g. image dimensions.

GET /v1/chat/conversations/{room}/members

List active members

Credential Project API key or chat token

ParameterInTypeRequiredNotes
roompathstringYes

POST /v1/chat/conversations/{room}/members

Add or re-activate a member

Credential Project API key or chat token

ParameterInTypeRequiredNotes
roompathstringYes
userIdbodystringYes1–128 chars — Your own user identity string — Livqeno never owns end-user accounts.
rolebodyChatMemberRoleNo
metadatabodyRecord<string, unknown>No

DELETE /v1/chat/conversations/{room}/members/{userId}

Remove a member (soft — their messages keep a resolvable author)

Credential Project API key or chat token

ParameterInTypeRequiredNotes
roompathstringYes
userIdpathstringYes

GET /v1/chat/conversations/{room}/messages

Message history, newest first, cursor-paginated

Credential Project API key or chat token

ParameterInTypeRequiredNotes
roompathstringYes
limitquerynumberNo1–100
beforequerystringNo0–256 chars — Opaque cursor from a previous page's nextCursor — walks backwards into history. Cursor-based, not offset-based, so pages stay stable while new messages arrive.
afterquerystringNo0–256 chars — Opaque cursor that walks forward toward newer messages. This is how a client catches up on what it missed while disconnected.
threadRootIdquerystringNo0–64 chars — Restrict to one thread, by the root message's public id.
senderIdquerystringNo0–128 chars — Restrict to one sender.
includeDeletedquerybooleanNoInclude soft-deleted messages as tombstones (no text). Useful for moderation views.

POST /v1/chat/conversations/{room}/messages

Send a message

Credential Project API key or chat token

ParameterInTypeRequiredNotes
roompathstringYes
textbodystringNoRequired for text messages. Length capped by CHAT_MAX_TEXT_LENGTH.
typebodystringNo"system" and "event" are server-only — a browser chat token cannot send them.
replyTobodystringNo0–64 chars — Public id of the message being replied to. Must be in the same conversation.
clientMessageIdbodystringNo0–128 chars — Idempotency key. Retrying a send with the same key returns the original message instead of creating a duplicate — which is what makes a reconnect-and-retry safe.
attachmentIdbodystringNo0–64 chars — Public id of an already-uploaded attachment (att_...).
metadatabodyRecord<string, unknown>NoDeveloper-owned JSON. Capped by CHAT_MAX_METADATA_BYTES.
senderIdbodystringNo0–128 chars — API-key callers only: the user this message is attributed to. Ignored for browser chat tokens, which always send as the token subject.
clientSentAtbodynumberNo0–∞ — Client send timestamp (epoch ms), used only for latency measurement. Never trusted as createdAt — the server stamps that.

GET /v1/chat/conversations/{room}/presence

Who is present right now. Ephemeral — never read from Postgres.

Credential Project API key or chat token

ParameterInTypeRequiredNotes
roompathstringYes

GET /v1/chat/conversations/{room}/read-receipts

Every member's read position — what a "seen by" row is built from

Credential Project API key or chat token

ParameterInTypeRequiredNotes
roompathstringYes

GET /v1/chat/conversations/{room}/read-state

Your read position and unread count for this conversation

Credential Project API key or chat token

ParameterInTypeRequiredNotes
roompathstringYes

GET /v1/chat/conversations/{room}/typing

Who is typing right now

Credential Project API key or chat token

ParameterInTypeRequiredNotes
roompathstringYes

DELETE /v1/chat/messages/{messageId}

Soft-delete a message; emits message.deleted

Credential Project API key or chat token

ParameterInTypeRequiredNotes
messageIdpathstringYes

GET /v1/chat/messages/{messageId}

Get one message

Credential Project API key or chat token

ParameterInTypeRequiredNotes
messageIdpathstringYes

PATCH /v1/chat/messages/{messageId}

Edit a message — sets editedAt and returns edited: true

Credential Project API key or chat token

ParameterInTypeRequiredNotes
messageIdpathstringYes
textbodystringNo
metadatabodyRecord<string, unknown>No

POST /v1/chat/messages/{messageId}/reactions

Add a reaction (idempotent per user+emoji)

Credential Project API key or chat token

ParameterInTypeRequiredNotes
messageIdpathstringYes

DELETE /v1/chat/messages/{messageId}/reactions/{emoji}

Remove a reaction

Credential Project API key or chat token

ParameterInTypeRequiredNotes
messageIdpathstringYes
emojipathstringYes

POST /v1/chat/messages/{messageId}/read

Mark this message — and everything before it — as read

Credential Project API key or chat token

ParameterInTypeRequiredNotes
messageIdpathstringYes

GET /v1/chat/messages/{messageId}/thread

Every message in this message's thread, oldest first

Credential Project API key or chat token

ParameterInTypeRequiredNotes
messageIdpathstringYes

POST /v1/chat/tokens

Mint a short-lived chat token for one of your users

Credential Project API key or chat token

ParameterInTypeRequiredNotes
userIdbodystringYes1–128 chars, pattern-checked — The end user this token speaks for. Everything they send is attributed to this identity — the browser can never override it.
conversationsbodystring[]Noarray — Conversation references (conv_ id, uuid, or name) this token may touch. Omit to allow every conversation the user is a member of.
scopesbodystring[]Noarray — Narrows the token below what the user's role allows. Can only ever remove permissions — listing "chat:manage" here does not grant it.
ttlSecondsbodynumberNo60–21600 — Lifetime in seconds. Defaults to CHAT_TOKEN_DEFAULT_TTL_SECONDS, capped at CHAT_TOKEN_MAX_TTL_SECONDS. There is no non-expiring chat token.

GET /v1/projects/{projectId}/chat/connections

Chat WebSocket sessions, newest first

Credential Dashboard session (JWT)

ParameterInTypeRequiredNotes
projectIdpathstringYes

GET /v1/projects/{projectId}/chat/conversations

Conversations with message counts and last activity

Credential Dashboard session (JWT)

ParameterInTypeRequiredNotes
projectIdpathstringYes

GET /v1/projects/{projectId}/chat/conversations/{conversationId}

One conversation — metadata only, no message content

Credential Dashboard session (JWT)

ParameterInTypeRequiredNotes
conversationIdpathstringYes
projectIdpathstringYes

GET /v1/projects/{projectId}/chat/conversations/{conversationId}/members

Members of one conversation

Credential Dashboard session (JWT)

ParameterInTypeRequiredNotes
conversationIdpathstringYes
projectIdpathstringYes

GET /v1/projects/{projectId}/chat/conversations/{conversationId}/messages

Message metadata for one conversation — id, sender, timing, status. Never content.

Credential Dashboard session (JWT)

ParameterInTypeRequiredNotes
conversationIdpathstringYes
projectIdpathstringYes

GET /v1/projects/{projectId}/chat/conversations/{conversationId}/presence

Who is present in one conversation right now (read from Redis, not Postgres)

Credential Dashboard session (JWT)

ParameterInTypeRequiredNotes
conversationIdpathstringYes
projectIdpathstringYes

GET /v1/projects/{projectId}/chat/overview

Chat activity for this project — real counters, never estimates

Credential Dashboard session (JWT)

ParameterInTypeRequiredNotes
projectIdpathstringYes

Next steps

  • Conventions — base path, error envelope, request ids, pagination.
  • Errors — every code this API can return.
  • All endpoints — the whole surface on one page.