API REFERENCE
Get Chat Messages
On this page
/api/chats/{id}/messagesRetrieve all messages (memories) for a specific chat room in chronological order.
Authentication
See the authentication guide for API key and account access requirements.
Request
curl --request GET \
--url 'https://api.recoupable.dev/api/chats/YOUR_ID/messages' \
--header 'x-api-key: YOUR_API_KEY'Replace the YOUR_ placeholders with your values. Required query parameters are included; optional parameters are listed below.
Try it
Fill in the fields, send the request from your browser, and read the live response. The curl below updates as you type.
Kept in this browser tab only and cleared when it closes.
curl --request GET \
--url 'https://recoup-api.vercel.app/api/chats/{id}/messages'Parameters
Path parameters
idstringrequiredThe unique identifier (UUID) of the chat room.
Responses
200Messages retrieved successfully+
application/json
dataarray<ChatMessage>requiredChronologically ordered list of messages for the chat
Item properties for data
idstringrequiredUUID of the memory message
format: uuid
room_idstringrequiredUUID of the parent chat room
format: uuid
contentobjectrequiredStructured message payload stored for the memory
updated_atstringrequiredISO timestamp of the memory update
format: date-time
400Bad request - invalid chat id+
application/json
statusstring · enumrequiredStatus of the request
Values: "error"
errorstringrequiredError message describing what went wrong
401Unauthorized - invalid or missing credentials+
application/json
errorintegerrequiredformat: int32
messagestringrequired403Forbidden - caller does not have access to this chat+
application/json
errorintegerrequiredformat: int32
messagestringrequired404Not found - chat does not exist or is not accessible+
application/json
statusstring · enumrequiredStatus of the request
Values: "error"
errorstringrequiredError message describing what went wrong
500Server error - failed to retrieve messages+
application/json
statusstring · enumrequiredStatus of the request
Values: "error"
errorstringrequiredError message describing what went wrong
Full specification
Download the OpenAPI file for complete schemas, constraints, and examples.
Download research.jsonView operation source
{
"description": "Retrieve all messages (memories) for a specific chat room in chronological order.",
"parameters": [
{
"name": "id",
"in": "path",
"description": "The unique identifier (UUID) of the chat room.",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "Messages retrieved successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetChatMessagesResponse"
}
}
}
},
"400": {
"description": "Bad request - invalid chat id",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetChatMessagesErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized - invalid or missing credentials",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden - caller does not have access to this chat",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not found - chat does not exist or is not accessible",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetChatMessagesErrorResponse"
}
}
}
},
"500": {
"description": "Server error - failed to retrieve messages",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetChatMessagesErrorResponse"
}
}
}
}
}
}