RecoupGet a Free AuditFree Audit

API REFERENCE

Get Chat Messages

On this page
GET/api/chats/{id}/messages

Retrieve 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
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.

Parameters

Path parameters

idstringrequired

The unique identifier (UUID) of the chat room.

Responses

200Messages retrieved successfully

application/json

dataarray<ChatMessage>required

Chronologically ordered list of messages for the chat

Item properties for data
idstringrequired

UUID of the memory message

format: uuid

room_idstringrequired

UUID of the parent chat room

format: uuid

contentobjectrequired

Structured message payload stored for the memory

updated_atstringrequired

ISO timestamp of the memory update

format: date-time

400Bad request - invalid chat id

application/json

statusstring · enumrequired

Status of the request

Values: "error"

errorstringrequired

Error message describing what went wrong

401Unauthorized - invalid or missing credentials

application/json

errorintegerrequired

format: int32

messagestringrequired
403Forbidden - caller does not have access to this chat

application/json

errorintegerrequired

format: int32

messagestringrequired
404Not found - chat does not exist or is not accessible

application/json

statusstring · enumrequired

Status of the request

Values: "error"

errorstringrequired

Error message describing what went wrong

500Server error - failed to retrieve messages

application/json

statusstring · enumrequired

Status of the request

Values: "error"

errorstringrequired

Error message describing what went wrong

Full specification

Download the OpenAPI file for complete schemas, constraints, and examples.

Download research.json
View operation source
json
{
  "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"
          }
        }
      }
    }
  }
}