API
Edit a user-authored chat message
PATCH
/chats/{session_id}/messages/{message_id}
const url = 'https://mw.omazy.ai/api/v1/chats/example/messages/example';const options = { method: 'PATCH', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"text":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://mw.omazy.ai/api/v1/chats/example/messages/example \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "text": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”session_id
required
string
Session UUID
message_id
required
string
Message ULID
Request Bodyrequired
Section titled “Request Bodyrequired”Edit payload
Media typeapplication/json
object
text
string
Examplegenerated
{ "text": "example"}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
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}Forbidden
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}Not Found
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}