Skip to content

List messages

GET
/conversations/{conversationId}/messages
curl --request GET \
--url 'https://optlo.com/api/v1/conversations/example/messages?limit=50&kind=message' \
--header 'Authorization: Bearer <token>'

Messages sort by descending sequence. Visibility is applied before pagination. Greeting-only conversations, retracted messages, empty messages, and assistant replies that are still generating are excluded.

conversationId
required
string

Unique identifier for the conversation.

limit
integer
default: 50 >= 1 <= 100

Maximum number of resources to return on one page.

cursor
string

Opaque cursor from the preceding page. Bound to workspace, resource and filters; survives key rotation.

kind
string
Allowed values: message note

Message requires messages:read; note requires notes:read. Omission requires messages:read and includes notes only with notes:read.

Success

Media typeapplication/json
Show child attributesHide child attributes
data
required

Resources on this page.

array of dictionaries

A customer-visible message or internal note.

Show child attributesHide child attributes
id
required

Unique identifier for the message or note.

string
conversationId
required

ID of the conversation containing this message.

string
kind
required

Whether this is a customer-visible message or an internal note.

string
Allowed values: message note
content
required

Markdown text of the message or note. Literal characters typed by users are backslash-escaped.

string
sender
required

Participant who sent the message.

dictionary
Show child attributesHide child attributes
id
required

Unique identifier for the sender.

string
role
required

Type of participant who sent the message.

string
Allowed values: user operator assistant
createdAt
required

Time the message was created.

string format: date-time
nextCursor
required

Pass this cursor to retrieve the next page. Null when no further page is available. When polling events in ascending order, retain the cursor even on empty pages.

nullable string

Example

{
"data": [
{
"id": "msg_h7m4k2r9p6x8n3q5v1z0bcdf",
"conversationId": "conv_B8kN4pR6xZ2_kR7mP3xB9nQ2vL5z",
"kind": "message",
"content": "Hi Sam, your workspace is ready. Can I help you get started?",
"sender": {
"id": "acc_tQ8nL4zR6mB2xP7k",
"role": "operator"
},
"createdAt": "2026-10-13T09:10:00.000Z"
}
],
"nextCursor": null
}