Conversations
Chats
List messages in a chat conversation
Retrieves messages in a specific conversation within a chat with cursor-based pagination. Messages are sorted chronologically from oldest to newest.
Use the beforeUUID parameter to get older messages and the afterUUID parameter to get newer messages. Please note:
- When beforeUUID is specified, the most recent messages before beforeUUID are returned.
- When beforeUUID and afterUUID are both specified, the most recent messages before beforeUUID are returned.
- When afterUUID is specified on its own, the least recent messages after afterUUID are returned.
get/v1/replicas/{replicaUUID}/chats/{chatUUID}/messages
Request
- Base URL: https://api.sensay.io
- URL: https://api.sensay.io/v1/replicas/{replicaUUID}/chats/{chatUUID}/messages
- Auth: one of:
- API key in header X-ORGANIZATION-SECRET and API key in header X-USER-ID and API key in header X-USER-ID-TYPE
- API key in header X-ORGANIZATION-SECRET
Path parameters
replicaUUIDstring uuid required
The replica unique identifier (UUID)
Example:03db5651-cb61-4bdf-9ef0-89561f7c9c53
chatUUIDstring uuid required
The chat UUID.
Example:8e9309af-baa4-4a85-8c59-c3a2a0c2ad0f
Query parameters
limitnumber
The number of messages to fetch.
Example:10
afterUUIDstring uuid
Only show messages after given message UUID. Excludes given message UUID.
Example:40d353f3-1241-449e-9fa6-c798d62c9cb1
beforeUUIDstring uuid
Only show messages before given message UUID. Excludes given message UUID.
Example:ec46b4db-3f0d-4392-b0f5-9fe327922e8a
Headers
X-API-Versionstring
Example:2025-03-25
Response
List of messages in the conversation
Example response
{
"items": [
{
"uuid": "03db5651-cb61-4bdf-9ef0-89561f7c9c53",
"createdAt": "2024-09-24T09:09:55.66709+00:00",
"content": "Hello world!",
"role": "user",
"senderName": "John Doe",
"senderProfileImageURL": "https://example.com/avatar.png",
"source": "web",
"replicaUUID": "03db5651-cb61-4bdf-9ef0-89561f7c9c53"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.