---
# System prepended metadata

title: Read \ unread API

---

# Read \ unread API

## Notifications

![](https://i.imgur.com/34LR1Ir.png)

## Pack description

### Queue messageStatus 

```
{
    entityId: Number,
    platformId: Number,
    isRead: Boolean,
    messageIds: Number[],
    includeAllAfter: Boolean(default: false)
}
```

| field | description
| ----- | -----------
| entityId |  |
| platformId |  | 
| isRead |  |
| messageIds | 
| includeOther |

#### API

method: PATCH
url: /messages/status


#### Queue handler

Queue name: ```messageStatus```

#### Examples
```
{
    entityId: 23,
    platformId: 3,
    isRead: true,
    messageIds: Number[45],
    includeAllAfter: false
}
```
> Action:  Only 45 must be readed
```
{
    entityId: 23,
    platformId: 3,
    isRead: true,
    messageIds: Number[45,89,67],
    includeAllAfter: true
}
```
> Action: [45,89,67] and all after max(messageIds) must be readed
```
{
    entityId: 23,
    platformId: 3,
    isRead: false,
    messageIds: Number[45],
    includeAllAfter: false
}
```
> Action: Only 45 must be unread
```
{
    entityId: 23,
    platformId: 3,
    isRead: false,
    messageIds: Number[45,67],
    includeAllAfter: true
}
```
>Action: [45,67] and all after max(messageIds) must be unread
>
### Topic messages

```
{
    sessionId: Number,
    event: String(read|unread),
    messageIds: Number[],
    includeAllAfter: Boolean
}
```

| field        | description
| ------------ | -----------
| entityId     |
| platformId   |
| isRead       |
| messageIds   | Original from queue pack
| includeOther |



