Skip to main content
GET
https://api.mor.org
/
api
/
v1
/
chat-history
/
chats
/
{chat_id}
/
messages
Get Chat Messages
curl --request GET \
  --url https://api.mor.org/api/v1/chat-history/chats/{chat_id}/messages \
  --header 'Authorization: <authorization>'
{
  "id": "<string>",
  "role": "<string>",
  "content": "<string>",
  "sequence": 123,
  "created_at": "<string>",
  "tokens": 123
}
Get messages for a specific chat. Returns a paginated list of messages in chronological order.

Headers

Authorization
string
required
Bearer token (JWT) from OAuth2 login

Path Parameters

chat_id
string
required
The ID of the chat to get messages from

Query Parameters

skip
integer
default:0
Number of records to skip for pagination
limit
integer
default:100
Maximum number of records to return

Response

Returns an array of message objects.
id
string
Unique message identifier
role
string
Message role: user or assistant
content
string
Message content
sequence
integer
Message order in conversation
created_at
string
ISO 8601 timestamp
tokens
integer
Token count (if available)
Chronological Order: Messages are returned in chronological order based on the sequence field, making it easy to display conversations naturally.
Pagination: For chats with many messages, use pagination to load messages in batches. This improves performance and reduces memory usage in your application.
This endpoint is similar to getting a full chat with /api/v1/chat-history/chats/{chat_id}, but allows for more granular pagination control and doesn’t include the chat metadata.