Browse Platform API
Platform APIEnterprise

Get conversation unread counts

Copy

Get a user's unread message counts for selected conversations.

HTTP request

POST {API_ADDRESS}/msg/get_conversations_unread_count

Request example

curl --request POST "${API_ADDRESS}/msg/get_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

ParameterRequiredTypeDescription
userIDYesstringUser whose unread state is queried.
conversationIDsYesstring[]Conversations to query.

Response

data.unreadCount maps each conversation ID to its unread count.

Errors

See Error codes.

Permissions and limits

  • Available only in OpenIM Enterprise.
  • Request array limits follow the delivered server version.