Platform APIEnterprise
Modify a message
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_messageRequest 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
| Parameter | Required | Type | Description |
|---|---|---|---|
| conversationID | Yes | string | OpenIM conversation ID. |
| seq | Yes | int | Message Seq. |
| newContent | Yes | string | New message content. |
| oldContent | Yes | string | Previous message content used for concurrency validation. |
Response
{
"errCode": 0,
"errMsg": "",
"errDlt": "",
"data": {"modifiedTime": 1719800000000, "modifiedCount": 1}
}| Field | Type | Description |
|---|---|---|
| data.modifiedTime | int | Modification time as a Unix timestamp in milliseconds. |
| data.modifiedCount | int | Number 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.
Related pages
Was this page helpful?