Platform APIEnterprise
Clear conversation unread counts
Clear a user's unread counts in selected conversations.
HTTP request
POST {API_ADDRESS}/msg/clear_conversations_unread_countRequest example
curl --request POST "${API_ADDRESS}/msg/clear_conversations_unread_count" --header "Content-Type: application/json" --header "operationID: ${OPERATION_ID}" --header "token: ${TOKEN}" --data-raw '{"userID":"user_001","conversationIDs":["si_user_001_user_002"]}'Request body
| Parameter | Required | Type | Description |
|---|---|---|---|
| userID | Yes | string | User whose unread state is cleared. |
| conversationIDs | Yes | string[] | Conversations to clear. |
Response
data.unreadCount maps each requested conversation ID to its resulting unread count.
Errors
See Error codes.
Permissions and limits
- Available only in OpenIM Enterprise.
- Clearing unread counts changes user state; validate the target user and conversations.
Related pages
Was this page helpful?