Browse Platform API
Platform APIEnterprise

Append stream-message packets

Copy

Append a batch of indexed text packets to an existing stream message and optionally mark the stream complete.

HTTP request

POST {API_ADDRESS}/msg/append_stream_msg

Request example

curl --request POST "${API_ADDRESS}/msg/append_stream_msg" \
  --header "Content-Type: application/json; charset=utf-8" --header "operationID: ${OPERATION_ID}" --header "token: ${TOKEN}" \
  --data-raw '{"conversationID":"si_user_001_user_002","clientMsgID":"client_msg_001","startIndex":0,"packets":["Hello", " world"],"end":true}'

Request body

ParameterRequiredTypeDescription
conversationIDYesstringConversation containing the stream message.
clientMsgIDYesstringClient message ID of the stream message.
startIndexYesintIndex assigned to the first packet in this batch.
packetsYesstring[]Ordered stream-message packets.
endYesboolWhether this batch completes the stream.

Response

The common response has errCode: 0 when the batch was accepted.

Errors

See Error codes.

Permissions and limits

  • Available only in OpenIM Enterprise.
  • Preserve packet indexes when retrying; do not blindly append duplicate content.