Skip to main content

update_conversation

Brief Description

  • Multiple users set fields for the same conversation

Request Method

  • post

Request URL

  • http://x.x.x.x:10002/conversation/set_conversations
Header NameExample ValueOptionalTypeDescription
operationID1646445464564RequiredstringoperationID is used for global link tracking
tokeneyJhbxxxx3XsRequiredstringAdministrator token

Request Sample Parameters

{
"userIDs": [
"1"
],
"conversation": {
"conversationID": "sg_xadxwr24",
"conversationType": 1,
"userID": "1",
"groupID": "xadxwr24",
"recvMsgOpt": 0,
"isPinned": false,
"isPrivateChat": true,
"ex": "",
"burnDuration": 30
}
}
Field NameOptionalTypeDescription
userIDsRequiredstring[]list of usersn who set the conversation
conversationIDRequiredstringID of the conversation being set
conversationTypeRequiredintconversation type, single chat is 1, group chat is 3
userIDOptionalstringuserID, required when it's single chat
groupIDOptionalstringgroupID, required when it's group chat
recvMsgOptOptionalintconversation muted state
isPinnedOptionalbooleanwhether conversation is pinned
isPrivateChatOptionalbooleanwhether conversation is deleted after reading
exOptionalstringextension
burnDurationOptionalstringtime interval for delete after reading, unit is second

Successful Return Sample

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

Successful Return Sample Explanation

Parameter NameTypeDescription
errCodeintError code, 0 indicates success
errMsgstringBrief error message, empty when no error
errDlterrDltDetailed error message, empty when no error

Failed Return Sample

{
"errCode": 1001,
"errMsg": "ArgsError",
"errDlt": "userID is empty: 1001 ArgsError"
}

Failed Return Sample Explanation

Parameter NameTypeDescription
errCodeintError code, refer to the global error code document
errMsgstringBrief error message
errDlterrDltDetailed error message