---
title: "🔒 Пакетная отметка сообщений чата как просмотренных текущим пользователем."
method: POST
path: "/chat/message/viewed"
tags: ["Chat: Messages"]
---

# 🔒 Пакетная отметка сообщений чата как просмотренных текущим пользователем.

`POST /chat/message/viewed`

## Request

- Base URL: `http://localhost`
- URL: `http://localhost/chat/message/viewed`
- Auth: one of:
  - API key in header `sid` and API key in header `rts` and API key in header `sig`
  - HTTP bearer

Пакетная отметка сообщений чата как просмотренных текущим пользователем.

**Access:** `authorized` (10 ) · **allowNullCompany:** true · **Scope:** `write`

**Allows:** `chat:read` (все обязательны; проверка в команде по ресурсу из запроса)

### TypeScript (copy-paste)

**`POST /chat/message/viewed`**

<details open><summary><b>Body</b></summary>

```typescript
export interface ChatMessageViewedBody {
}
```

</details>

<details open><summary><b>Response</b></summary>

```typescript
export type ChatMessageViewedResponse = IServerResponse<Resp_chat_message_viewed>

export interface IServerResponse<T = any> {
  code: number
  data: T
  srvTS: number
  rkey: string
}
```

</details>

> Полный файл типов: [`/docs/types`](/docs/types) · raw: [`/docs/api-types.ts`](/docs/api-types.ts)

## Headers

- `devID` string, uuid, required
- `tz` string, required
- `app` string, required
- `appVer` string, required
- `rKey` string

## Request body

- ChatMessageViewedBody: JSON body for `chat/message/viewed`

## Response `200`

OK — `IServerResponse<Resp_chat_message_viewed>`

- object
  - `code` integer, required
  - `data` RespChatMessageViewed, required: Empty response object
  - `srvTS` integer, required: Server timestamp (ms)
  - `rkey` string, required: Request key

## Other responses

- `400`: BadRequest / Validation — неверные params/body/headers
- `401`: Unauthorized: Active user session required
- `403`: AccessNotAllowed — privilegeRequired: нет привилегии; data.params = { code: 'privilegeRequired', allow, relation? }
- `404`: NotFound: User is not a member of the chat
- `406`: TimeResync — расхождение rts с сервером
- `422`: UnprocessableContent: Empty body, missing datetime, or unknown message IDs

---

[API](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api.md) · [All operations](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api/revisions/a143b51ba29a?raw)
