Skip to main content

Update a community channel message

Update the content of a sent community channel message. The message type cannot be changed. For example, if the original message is a text message, the new content must also be a text message.

Request method

POST: https://Base URL/v4/community-channel/message/update

Rate limit: 100 requests per minute

Signature required: All server API requests require signature verification. See API request signature.

Request body

The request body is in application/json format and supports the following parameters:

ParameterTypeRequiredDescription
channelIdStringYesThe community channel ID that the message belongs to.
subchannelIdStringNoThe subchannel ID that the message belongs to. Required unless the message is in the default subchannel (RCDefault).
fromUserIdStringYesThe sender's user ID.
messageUIDStringYesThe message UID. Obtainable via the message routing service. See Message routing.
contentStringYesThe updated message content. Maximum 128 KB per message. The message type cannot be changed.
  • Built-in message types: Serialize the message content JSON object into a JSON string. See User content message formats for JSON structures. For example, for a text message with a content field, pass {"content":"Hello world!"} serialized as a string.
  • Custom message types (objectName must be set to the custom type): The content format is flexible and not limited to JSON.

Request example

HTTP
POST /v4/community-channel/message/update HTTP/1.1
Host: api-cn.ronghub.com
App-Key: uwd1c0sxdlx2
Nonce: 14314
Timestamp: 1408710653491
Signature: 45beb7cc7307338a8e711219a47b7cf6a5b000e8
Content-Type: application/json

{
"channelId": "BWSZNmXBD",
"subchannelId": "channel1",
"fromUserId": "2191",
"messageUID": "C16R-VBGG-1IE5-SD0C",
"content": "{\"content\":\"hello\",\"extra\":\"helloExtra\"}"
}

Response

The response body contains a JSON object with the following structure:

FieldTypeDescription
codeNumberStatus code. 0 indicates success.

Response example

HTTP
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{"code":0}