Chat

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

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

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

Request

  • Base URL: https://erp.akeda.ru
  • URL: https://erp.akeda.ru/api/v1/chat/upload-sessions/{sessionId}/finish
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://erp.akeda.ru/oauth2/authorize, token URL https://erp.akeda.ru/oauth2/token, scopes: akeda:delegate)

Request body

EmptyObject required

Response

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

idstring uuid required
conversation_idstring uuid required
message_idstring uuid nullable required
original_namestring required
content_typestring required
size_bytesinteger required
sha256_hexstring required
media_kind'voice' | 'video_circle' | 'image' | 'video' | 'file' required
duration_msinteger nullable required
waveforminteger[] required
status'quarantined' | 'ready' | 'failed' | 'deleted' required
scan_status'pending' | 'clean' | 'infected' | 'unavailable' | 'skipped' required
scan_error_codestring
created_atstring date-time required
content_urlstring required

Example response

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

Changes

No recorded changes to this operation across all 1 revision of this API.