API
Send a message in a chat session
POST
/chats/{id}/messages
const url = 'https://mw.omazy.ai/api/v1/chats/example/messages';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"action_data":[1],"action_id":"example","action_payload":[1],"action_source_id":"example","action_type":"example","channel":"example","chat_session_id":"example","content":[1],"content_type":"example","display_text":"example","is_private":true,"is_read_once":true,"reply_to_message_id":"example","sender_id":"example","sender_type":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://mw.omazy.ai/api/v1/chats/example/messages \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "action_data": [ 1 ], "action_id": "example", "action_payload": [ 1 ], "action_source_id": "example", "action_type": "example", "channel": "example", "chat_session_id": "example", "content": [ 1 ], "content_type": "example", "display_text": "example", "is_private": true, "is_read_once": true, "reply_to_message_id": "example", "sender_id": "example", "sender_type": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Session UUID
Request Bodyrequired
Section titled “Request Bodyrequired”Message payload
Media typeapplication/json
object
action_data
Array<integer>
action_id
string
action_payload
Array<integer>
action_source_id
string
action_type
Postback fields (#167). Only inspected when ContentType == “postback”. The handler folds them into ActionPayload before calling PersistMessage, so the rest of the pipeline only ever sees the projected action_response shape.
string
channel
string
chat_session_id
string
content
Array<integer>
content_type
string
display_text
string
is_private
boolean
is_read_once
boolean
reply_to_message_id
string
sender_id
string
sender_type
string
Examplegenerated
{ "action_data": [ 1 ], "action_id": "example", "action_payload": [ 1 ], "action_source_id": "example", "action_type": "example", "channel": "example", "chat_session_id": "example", "content": [ 1 ], "content_type": "example", "display_text": "example", "is_private": true, "is_read_once": true, "reply_to_message_id": "example", "sender_id": "example", "sender_type": "example"}Responses
Section titled “Responses”Created
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
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
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}