Chat

Проверить и опубликовать вложение чата

Changed on

Повторно проверяет право, размер, контрольную сумму и антивирус. Только чистый файл становится ready и может передаваться в attachment_ids сообщения; повтор finish возвращает тот же результат.

post/api/v1/chat/upload-sessions/{sessionId}/finish

Request

  • Base URL
    https://erp.akeda.ru
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization codehttps://erp.akeda.ru/oauth2/authorize
      Token URLhttps://erp.akeda.ru/oauth2/token
      Scopesakeda:delegate

Path parameters

sessionId, string uuid required

Headers

X-Tenant, string required

Slug выбранного кабинета; кабинет не является юрлицом

Request body

EmptyObject required

Response

Вложение, готовое для attachment_ids

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. По пропорции клиент резервирует место под фото до загрузки картинки

Example response

{
  "content_url": "/api/v1/chat/attachments/00000000-0000-0000-0000-000000000001/content"
}

Changes

    • info

      added the optional property image_height to the response with the status

    • info

      added the optional property image_width to the response with the status

    • info

      added the optional property field to the response with the status

    7 more changes in this revision