---
title: "Идемпотентно переслать сообщение в доступный чат"
method: POST
path: "/api/v1/chat/conversations/{id}/messages/{messageId}/forward"
tags: ["Chat"]
---

# Идемпотентно переслать сообщение в доступный чат

`POST /api/v1/chat/conversations/{id}/messages/{messageId}/forward`

## Request

- Base URL: `https://erp.akeda.ru`
- URL: `https://erp.akeda.ru/api/v1/chat/conversations/{id}/messages/{messageId}/forward`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Authorization code: `https://erp.akeda.ru/oauth2/authorize`
    - Token URL: `https://erp.akeda.ru/oauth2/token` scopes: `akeda:delegate`

Проверяет чтение исходного и запись целевого чата; вложения физически копируются под новым tenant-scoped object key.

## Path parameters

- `id` string, uuid, required
- `messageId` string, uuid, required

## Headers

- `X-Tenant` string, required

## Request body

- ChatForwardMessage
  - `target_conversation_id` string, uuid, required
  - `client_message_id` string, uuid, required

## Response `200`

Повтор ранее зафиксированной пересылки

- ChatForwardMessageResult
  - `message` ChatForwardedMessage, required
    - `id` string, uuid, required
    - `conversation_id` string, uuid, required
    - `seq` integer, required
    - `sender_user_id` integer, nullable, required
    - `kind` 'text' | 'system' | 'application' | 'file', required
    - `body` string, required
    - `reply_to_message_id` string, uuid, nullable, required
    - `forwarded_from_message_id` string, uuid, nullable, required
    - `forwarded_from_user_id` integer
    - `forwarded_from_name` string
    - `mentions` ChatMessageMention[], required
      - `user_id` integer, required
      - `display_name` string, required
    - `reactions` ChatMessageReaction[], required
      - `emoji` string, required
      - `count` integer, required
      - `is_own` boolean, required
    - `client_message_id` string, uuid, nullable, required
    - `created_at` string, date-time, required
    - `edited_at` string, date-time, nullable, required
    - `deleted_at` string, date-time, nullable, required: Надгробие: сообщение удалено у всех
    - `attachments` ChatForwardedAttachment[], required
      - `id` string, uuid, required
      - `conversation_id` string, uuid, required
      - `message_id` string, uuid, nullable, required
      - `original_name` string, required
      - `content_type` string, required
      - `size_bytes` integer, required
      - `sha256_hex` string, required
      - `media_kind` 'voice' | 'video_circle' | 'image' | 'video' | 'file', required
      - `duration_ms` integer, nullable, required
      - `waveform` integer[], required
      - `status` 'quarantined' | 'ready' | 'failed' | 'deleted', required
      - `scan_status` 'pending' | 'clean' | 'infected' | 'unavailable' | 'skipped', required
      - `scan_error_code` string
      - `created_at` string, date-time, required
      - `content_url` string, required
      - `image_width` integer: Ширина фото на экране в пикселях (с поворотом EXIF), измеренная при загрузке. Только у media_kind=image и только вместе с image_height; нет — старое вложение или HEIF/AVIF, клиент измеряет картинку сам
      - `image_height` integer: Высота фото на экране в пикселях; пара к image_width. По пропорции клиент резервирует место под фото до загрузки картинки
  - `created` boolean, required

## Other responses

- `201`: Новая пересылка
- `400`: Некорректный запрос или нарушение бизнес-правила
- `401`: Сессия, ключ или кабинет не подтверждены
- `403`: Текущая роль не имеет требуемого права
- `404`: Запись не найдена или не видима текущему пользователю
- `409`: Конфликт версии, идемпотентности или бизнес-состояния

## Changes

- **2026-11-13** `b25478302e46`: 4 info
  - added the optional property `message/attachments/items/image_height` to the response with the `200` status
  - added the optional property `message/attachments/items/image_height` to the response with the `201` status
  - added the optional property `message/attachments/items/image_width` to the response with the `200` status
  - added the optional property `message/attachments/items/image_width` to the response with the `201` status
- **2026-10-27** `4323d2165568`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/akeda/apis/akeda-erp-client-api/changes/api/v1/chat/conversations/:id/messages/:messageId/forward/post.md)

---

[API](https://skmtc.dev/akeda/apis/akeda-erp-client-api.md) - [All operations](https://skmtc.dev/akeda/apis/akeda-erp-client-api/llms.txt) - [OpenAPI document](https://skmtc.dev/akeda/apis/akeda-erp-client-api/revisions/084f7bbc939c?raw)
