# Unread Count

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

* Note: to query the count of unread messages
* Header

| Field         | Type   | Remarks                                                                                |
| ------------- | ------ | -------------------------------------------------------------------------------------- |
| ApiKey        | String | [ApiKey](../../../guide/glossary#apikey) acquired from the admin                       |
| Authorization | String | Bearer ${unifiedAuthToken} , in which the unifiedAuthToken is returned by /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     | the Return Code    |
| desc  | String     | the Return Message |
| data  | UnReadInfo | the Data           |

The UnReadInfo field consists of the following subfields:

| Field         | Type | Remarks                   |
| ------------- | ---- | ------------------------- |
| unreadCount   | int  | number of unread messages |
| mentionsCount | int  | number of mentions        |

* Response Body

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

* Return Code

| code | desc    | Remarks                           |
| ---- | ------- | --------------------------------- |
| 0    | success | the flag for a successful request |
