Conversation Management
Set Conversation Unread Count
Set the unread message count for a specified conversation
POST
Overview
Set the unread message count for a specified conversation, used for manually adjusting the unread status of conversations.Request Body
Required Parameters
User ID
Channel ID
Channel type (1=personal channel, 2=group channel)
Unread count to set
Response Fields
Operation status, returns
"success" on successStatus Codes
| Status Code | Description |
|---|---|
| 200 | Unread count set successfully |
| 400 | Request parameter error |
| 403 | No operation permission |
| 500 | Internal server error |
Use Cases
Manual Unread Management
Mark Conversation as Important:Notification Management
Custom Notification Badges:Batch Unread Operations
Batch Set Unread Counts:Priority Management
Set Priority-based Unread Counts:Sync and Recovery
Sync Unread Counts from External Source:Testing and Development
Test Unread Scenarios:Best Practices
- Validation: Validate unread count values (non-negative integers)
- UI Consistency: Ensure UI updates match the set unread count
- Error Handling: Handle API errors gracefully without breaking UI
- Performance: Batch operations when setting multiple unread counts
- User Experience: Use meaningful unread counts that help users prioritize
- Sync Strategy: Implement proper sync mechanisms for unread counts
- Testing: Test various unread count scenarios during development

