# 未读消息数

## <mark style="color:blue;">GET</mark> api/v1/message/unreadCount

* 说明：查询未读消息总数。
* Header

| Field         | Type   | Remarks                                                                                        |
| ------------- | ------ | ---------------------------------------------------------------------------------------------- |
| ApiKey        | String | 从管理员获取的[ApiKey](https://relationlabs.gitbook.io/relation-one-api/api-zh/guide/glossary#apikey) |
| Authorization | String | Bearer ${unifiedAuthToken} ,其中unifiedAuthToken来自/api/v1/auth接口的返回                              |

* Request Example

```shell
curl POST 'https://api.relationlabs.ai/api/v1/message/unreadCount' \
--header 'ApiKey: 581c6c4fa0b54912b00088aa563342a4' \
--header 'Authorization: bearer eyJhbGciOiJFUzI1NiJ9.eyJqdGkiOiI0MzdiN2EzZDEwMGY0ODVkOWVhMWUzZmZlOWE1NmEyZSIsImlzcyI6InJlbGF0aW9ubGFicy5haSIsImlhdCI6MTY2NTIxNTUzNSwic3ViIjoiZGhreXEtc3FhYWEtYWFhYWotc2d6M3EtY2FpIiwiZXhwIjoxNjY1ODIwMzM1fQ.rj7KKuIcgmvaIwZ63YHnXQ4jvvI-eR2Wo7k3YEyzMuxo8j5ezCowKDpcW0u9zIuHPFqwD0-1XPWdPLR1d1HLFw'
```

* Response Parameters

| Field | Type       | Remarks |
| ----- | ---------- | ------- |
| code  | String     | 返回码     |
| desc  | String     | 返回信息    |
| data  | UnReadInfo | 数据      |

The UnReadInfo field consists of the following subfields:

| Field         | Type | Remarks |
| ------------- | ---- | ------- |
| unreadCount   | int  | 未读消息总数  |
| mentionsCount | int  | 被提及的总数  |

* Response Body

```json
{
    "code": "0",
    "desc": "success",
    "data": {
        "unreadCount": 0,
        "mentionsCount": 0
    }
}
```

* Return Code

| code | desc    | Remarks |
| ---- | ------- | ------- |
| 0    | success | 接口调用成功  |
