Browse Platform API
Platform API

Revoke a message

Copy

Use this endpoint to revoke a sent message by conversation ID and message Seq. After the operation succeeds, relevant clients receive the message revoke synchronization event.

HTTP request

POST {API_ADDRESS}/msg/revoke_msg

Request example

curl --request POST "${API_ADDRESS}/msg/revoke_msg" \
  --header "Content-Type: application/json; charset=utf-8" \
  --header "operationID: ${OPERATION_ID}" \
  --header "token: ${ADMIN_TOKEN}" \
  --data-raw '{"conversationID":"si_user_001_user_002","seq":128,"userID":"user_001"}'

Request body

ParameterRequiredTypeDescription
conversationIDYesstringTarget conversation ID.
seqYesintSeq of the message to revoke.
userIDYesstringUser ID of the revoke operator.

Response

{"errCode": 0, "errMsg": "", "errDlt": ""}

errCode === 0 means that OpenIM completed the revoke request. Authorize the operator in your business backend and record the operator, reason, conversation, and Seq for audit. See Error codes for failures.