ChatRpc
This endpoint group provides chat transcript retrieval, message search, and emoji reaction updates for chat messages. The exposed methods operate through the JSON-RPC transport at POST /api/rpc.
Endpoints
POST /api/rpc (Method: ChatRpc.getThreadMessages)
- Description: Retrieves the clean UI message transcript for a specific thread, with cursor-based pagination.
- Request Body:
{ "method": "ChatRpc.getThreadMessages", "params": { "threadId": "string", "before": "2024-01-01T00:00:00.000Z", "limit": 50 } } - Parameters:
Name Type Required Description threadIdStringYes Thread identifier used to select the transcript. beforeString | nullNo Optional cursor value. The source comment indicates this is an ISO date string. limitNumberNo Maximum number of messages to return. Defaults to 50when omitted. The schema constrains values to integers from1to200. - Response:
The returned data shape is determined by the underlying chat service and is not exposed in this file.{ "success": true, "data": "implementation-defined" } - Example (cURL):
curl -X POST "${APP_BASE_URL}/api/rpc" \ -H "Content-Type: application/json" \ -d '{ "method": "ChatRpc.getThreadMessages", "params": { "threadId": "thread_123", "limit": 50 } }'
POST /api/rpc (Method: ChatRpc.searchMessages)
- Description: Searches messages across threads or within a specific thread.
- Request Body:
{ "method": "ChatRpc.searchMessages", "params": { "query": "hello", "threadId": "thread_123", "page": 1, "pageSize": 20 } } - Parameters:
Name Type Required Description queryStringYes Search term. The schema requires at least one character. threadIdString | nullNo Optional thread filter. pageNumberNo Page number for pagination. Defaults to 1when omitted. The schema constrains values to integers greater than or equal to1.pageSizeNumberNo Number of results per page. Defaults to 20when omitted. The schema constrains values to integers from1to100. - Response:
The returned data shape is determined by the underlying chat service and is not exposed in this file.{ "success": true, "data": "implementation-defined" } - Example (cURL):
curl -X POST "${APP_BASE_URL}/api/rpc" \ -H "Content-Type: application/json" \ -d '{ "method": "ChatRpc.searchMessages", "params": { "query": "hello" } }'
POST /api/rpc (Method: ChatRpc.addReaction)
- Description: Adds an emoji reaction to a message.
- Request Body:
{ "method": "ChatRpc.addReaction", "params": { "messageId": "message_123", "emoji": "👍" } } - Parameters:
Name Type Required Description messageIdStringYes Identifier of the message to update. emojiStringYes Emoji to add. The schema requires at least one character. - Response:
This method returns the updated reactions value from the chat service.{ "success": true, "data": { "reactions": "implementation-defined" } } - Example (cURL):
curl -X POST "${APP_BASE_URL}/api/rpc" \ -H "Content-Type: application/json" \ -d '{ "method": "ChatRpc.addReaction", "params": { "messageId": "message_123", "emoji": "👍" } }'
POST /api/rpc (Method: ChatRpc.removeReaction)
- Description: Removes an emoji reaction from a message.
- Request Body:
{ "method": "ChatRpc.removeReaction", "params": { "messageId": "message_123", "emoji": "👍" } } - Parameters:
Name Type Required Description messageIdStringYes Identifier of the message to update. emojiStringYes Emoji to remove. The schema requires at least one character. - Response:
This method returns the updated reactions value from the chat service.{ "success": true, "data": { "reactions": "implementation-defined" } } - Example (cURL):
curl -X POST "${APP_BASE_URL}/api/rpc" \ -H "Content-Type: application/json" \ -d '{ "method": "ChatRpc.removeReaction", "params": { "messageId": "message_123", "emoji": "👍" } }'