GetUnreadCount
[POST] .../v1/chat/getunreadcount
Returns the total unread message count for the current user. Use this method to render a global unread chat badge for the current request user. The method has no request body and returns result.unread_count, calculated from unread message state across chats available to the current user. Access is scoped to the current user; no separate chat permission is required by the controller because the persistent layer counts only records visible to that user. Database, cache, unread-state storage or profile-scope failures are returned as HTTP 200 ErrorResult business errors.
Request Parameters
No request body.
Request Example
{}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | ChatUnreadCount | Result object. |
Response Example
{
"ok": true,
"result": {
"unread_count": 12
}
}