Browse Platform API
Platform APIEnterprise

Modify a message

Copy

Modify the content of a message identified by conversation ID and Seq. The response reports the modification time and count. This endpoint is available in OpenIM Enterprise.

HTTP request

POST {API_ADDRESS}/msg/modify_message

Request example

curl --request POST "${API_ADDRESS}/msg/modify_message" \
  --header "Content-Type: application/json; charset=utf-8" \
  --header "operationID: ${OPERATION_ID}" \
  --header "token: ${TOKEN}" \
  --data-raw '{"conversationID":"si_user_001_user_002","seq":1,"newContent":"updated content","oldContent":"original content"}'
Enterprise: this endpoint requires the corresponding Enterprise service. Availability and authorization depend on the delivered version.

Request body

ParameterRequiredTypeDescription
conversationIDYesstringOpenIM conversation ID.
seqYesintMessage Seq.
newContentYesstringNew message content.
oldContentYesstringPrevious message content used for concurrency validation.

Response

{
  "errCode": 0,
  "errMsg": "",
  "errDlt": "",
  "data": {"modifiedTime": 1719800000000, "modifiedCount": 1}
}
FieldTypeDescription
data.modifiedTimeintModification time as a Unix timestamp in milliseconds.
data.modifiedCountintNumber of modifications recorded for the message.

Authorize the operator and target resource in your business backend. Relevant clients can receive the synchronized message change according to the delivered Enterprise version.