API
List messages in a chat session
GET
/chats/{id}/messages
const url = 'https://mw.omazy.ai/api/v1/chats/example/messages?limit=25&direction=forward';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://mw.omazy.ai/api/v1/chats/example/messages?limit=25&direction=forward' \ --header 'Authorization: <Authorization>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Session UUID
Query Parameters
Section titled “Query Parameters”cursor
string
Pagination cursor
limit
integer
Items per page
direction
string
Forward (default, newer) | backward (older)
Responses
Section titled “Responses”OK
Media typeapplication/json
object
data
error
object
code
string
message
string
meta
object
next_cursor
string
page
integer
per_page
integer
total
integer
success
boolean
data
Array<object>
object
action_id
string
action_payload
Array<integer>
action_source_id
string
channel
string
chat_session_id
string
content
Array<integer>
content_type
string
conversation_id
string
created_at
string
deleted_at
DeletedAt is the user-driven soft-delete timestamp added by migration 000036. NULL means the row is live; non-NULL means it should be hidden from the user AND excluded from the OU AI LLM context window. Distinct from gdpr_purged which is the legal/compliance purge path.
string
edited_at
string
gdpr_original_content_type
string
gdpr_purged
boolean
gdpr_purged_at
string
id
ULID
string
identity_id
string
is_edited
boolean
is_pinned
boolean
is_private
boolean
is_read_once
boolean
original_content
Array<integer>
reply_snapshot
Array<integer>
reply_to_message_id
string
sender_id
string
sender_type
string
status
string
translations
Array<integer>
updated_at
string
meta
object
next_cursor
string
page
integer
per_page
integer
total
integer
Examplegenerated
{ "data": [ { "action_id": "example", "action_payload": [ 1 ], "action_source_id": "example", "channel": "example", "chat_session_id": "example", "content": [ 1 ], "content_type": "example", "conversation_id": "example", "created_at": "example", "deleted_at": "example", "edited_at": "example", "gdpr_original_content_type": "example", "gdpr_purged": true, "gdpr_purged_at": "example", "id": "example", "identity_id": "example", "is_edited": true, "is_pinned": true, "is_private": true, "is_read_once": true, "original_content": [ 1 ], "reply_snapshot": [ 1 ], "reply_to_message_id": "example", "sender_id": "example", "sender_type": "example", "status": "example", "translations": [ 1 ], "updated_at": "example" } ], "error": { "code": "example", "message": "example" }, "meta": { "next_cursor": "example", "page": 1, "per_page": 1, "total": 1 }, "success": true}Bad Request
Media typeapplication/json
object
data
error
object
code
string
message
string
meta
object
next_cursor
string
page
integer
per_page
integer
total
integer
success
boolean
error
object
code
string
message
string
Examplegenerated
{ "data": "example", "error": { "code": "example", "message": "example" }, "meta": { "next_cursor": "example", "page": 1, "per_page": 1, "total": 1 }, "success": true}Unauthorized
Media typeapplication/json
object
data
error
object
code
string
message
string
meta
object
next_cursor
string
page
integer
per_page
integer
total
integer
success
boolean
error
object
code
string
message
string
Examplegenerated
{ "data": "example", "error": { "code": "example", "message": "example" }, "meta": { "next_cursor": "example", "page": 1, "per_page": 1, "total": 1 }, "success": true}