Skip to main content

Set Fields for Multiple Users in the Same Conversation

Brief Description

  • Allows multiple users to selectively set fields for the same conversation.

Request Method

  • post

Request URL

  • http://x.x.x.x:10002/conversation/set_conversations
Header NameExample ValueRequiredTypeDescription
operationID1646445464564RequiredstringThe operationID is used for global tracing.
tokeneyJhbxxxx3XsRequiredstringAdmin token

Request Parameter Example

{
"userIDs": [
"6965946400"
],
"conversation": {
"conversationID": "si_4365007572_6965946400",
"conversationType": 1,
"userID": "4365007572",
"groupID": "",
"recvMsgOpt": 0,
"isPinned": false,
"isPrivateChat": true,
"ex": "",
"burnDuration": 30
}
}
Field NameRequiredTypeDescription
userIDsRequiredarrayList of user IDs for whom the conversation fields will be set.
conversationRequiredobjectConversation object.
conversation.conversationIDRequiredstringConversation ID.
conversation.conversationTypeRequiredintConversation type, 1 for single chat, 3 for group chat.
conversation.userIDOptionalstringRequired if the conversation type is single chat.
conversation.groupIDOptionalstringRequired if the conversation type is group chat.
conversation.recvMsgOptOptionalintConversation do-not-disturb status.
conversation.isPinnedOptionalbooleanWhether the conversation is pinned.
conversation.isPrivateChatOptionalbooleanWhether the private chat (self-destructing messages) feature is enabled.
conversation.exOptionalstringConversation extension field.
conversation.burnDurationOptionalstringSet the self-destruct timer for the conversation, in seconds.

Successful Response Example

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

Successful Response Parameters Description

Parameter NameTypeDescription
errCodeintError code, 0 indicates success.
errMsgstringBrief error message, empty if there is no error.
errDltstringDetailed error message, empty if there is no error.
dataobjectCommon data object, see below for the specific structure.

Failed Response Example

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

Failed Response Parameters Description

Parameter NameTypeDescription
errCodeintError code, refer to the global error code documentation for details.
errMsgstringBrief error message.
errDltstringDetailed error message.