All endpoints require an active session cookie.
The Vote type
AVote records a user’s thumbs-up or thumbs-down reaction to a single assistant message. The composite primary key is (chatId, messageId).
UUID of the chat the voted message belongs to.
UUID of the message being voted on.
true for an upvote, false for a downvote.GET /api/vote
Fetch all votes recorded for a specific chat. Authentication: required (session cookie)Query parameters
UUID of the chat whose votes you want to retrieve.
Response
Returns a JSON array ofVote objects. The array is empty when no votes exist for the chat.
Example response
Error codes
| Status | Meaning |
|---|---|
400 | chatId query parameter is missing. |
401 | Missing or invalid session. |
Example
curl
TypeScript
PATCH /api/vote
Cast or update a vote on an assistant message. If a vote already exists for the given(chatId, messageId) pair it is updated in place; otherwise a new vote record is inserted.
Authentication: required (session cookie)
Request body
UUID of the chat the message belongs to.
UUID of the message to vote on.
Vote direction. Either
"up" or "down".Response
Returns200 Message voted as plain text on success.
Error codes
| Status | Meaning |
|---|---|
400 | One or more of chatId, messageId, or type is missing from the request body. |
401 | Missing or invalid session. |
Example
curl
TypeScript
GET /api/suggestions
Fetch all AI-generated inline edit suggestions for a specific document version. Authentication: required (session cookie). Returns401 if the suggestions belong to a different user.
The Suggestion type
UUID of the suggestion.
UUID of the document these suggestions apply to.
ISO 8601 timestamp identifying the specific document version.
The existing text in the document that is proposed to be replaced.
The replacement text proposed by the AI.
Optional human-readable explanation of the suggested change.
Whether the suggestion has been accepted or dismissed. Defaults to
false.UUID of the user who owns the suggestion.
ISO 8601 timestamp of when the suggestion was created.
Query parameters
UUID of the document whose suggestions you want to retrieve.
Response
Returns a JSON array ofSuggestion objects. Returns an empty array ([]) when no suggestions exist for the document.
Error codes
| Status | Meaning |
|---|---|
401 | Missing or invalid session, or the suggestions belong to a different user. |
404 | documentId query parameter is missing. |
Example
curl
TypeScript