Skip to main content

Multiple Users Selectively Setting Fields for a Conversation with the Same ID

Brief Description

  • Multiple users can selectively set fields for the same conversation.

Request Method

  • post

Request URL

  • {API_ADDRESS}/conversation/set_conversations
Header NameExample ValueOptionalTypeDescription
operationID1646445464564RequiredstringUsed for global link tracking, timestamp is recommended, independent in each request
tokeneyJhbxxxx3XsRequiredstringAdmin token

Request Parameter Example

{
"userIDs": [
"6965946400"
],
"conversation": {
"conversationID": "si_4365007572_6965946400",
"conversationType": 1,
"userID": "4365007572",
"groupID": "",
"recvMsgOpt": 0,
"attachedInfo": "attached",
"isPinned": false,
"isPrivateChat": true,
"ex": "",
"burnDuration": 30
}
}
Field NameOptionalTypeDescription
userIDsRequiredarrayList of user IDs to set message fields
conversationRequiredobjectConversation object
conversation.conversationIDRequiredstringConversation ID
conversation.conversationTypeRequiredintConversation type, 1 for single chat, 3 for group chat
conversation.userIDOptionalstringRequired when conversation type is single chat
conversation.groupIDOptionalstringRequired when conversation type is group chat
conversation.recvMsgOptOptionalintConversation Do Not Disturb status
conversation.attachedInfoOptionalstringConversation additional information, reserved field
conversation.isPinnedOptionalbooleanWhether conversation is pinned
conversation.isPrivateChatOptionalbooleanWhether read and burn is turned on
conversation.exOptionalstringConversation extension field
conversation.burnDurationOptionalintSet conversation read and burn time, unit is seconds

Success Return Example

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

Parameter Description for Success Return Example

Parameter NameTypeDescription
errCodeintError code, 0 means successful
errMsgstringBrief error message, empty
errDlterrDltDetailed error message, empty
dataobjectGeneric data object, specific structure is below

Failure Return Example

{
"errCode": 1004,
"errMsg": "RecordNotFoundError",
"errDlt": ": [1004]RecordNotFoundError"
}

Parameter Description for Failure Return Example

Parameter NameTypeDescription
errCodeintError code, specifically check the global error code document
errMsgstringBrief error message
errDlterrDltDetailed error message