Platform APIEnterprise
Set a conversation unread count
Set a target unread count for a user in selected conversations. This operation is intended for data migration or state correction; it is distinct from setting an exact read Seq.
HTTP request
POST {API_ADDRESS}/msg/reset_conversation_unreadRequest example
curl --request POST "${API_ADDRESS}/msg/reset_conversation_unread" --header "Content-Type: application/json" --header "operationID: ${OPERATION_ID}" --header "token: ${TOKEN}" --data-raw '{"userID":"user_001","conversationIDs":["si_user_001_user_002"],"num":3}'Request body
| Parameter | Required | Type | Description |
|---|---|---|---|
| userID | Yes | string | User whose unread state is changed. |
| conversationIDs | Yes | string[] | Conversations to update. |
| num | Yes | int | Target unread count. |
Response
The common response has errCode: 0 when the target state was applied.
Errors
See Error codes.
Permissions and limits
- Available only in OpenIM Enterprise.
- For an exact imported read boundary, use Mark a conversation read through a Seq.
Related pages
Was this page helpful?