Mail messages

Приложить к письму файл из хранилища

Changed on

Документ из папки компании прикладывается по идентификатору: браузер его не скачивает и не загружает обратно. Содержимое копируется в момент вызова, поэтому письмо уходит с тем файлом, который человек видел, а более поздняя правка документа его не меняет. Право на файл проверяет файловое хранилище по действующему сотруднику: доступ к ящику чужую папку не открывает. Потолок одного файла — 25 МБ.

post/api/v1/mail/accounts/{id}/uploads/from-file

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

id, string uuid required

Headers

X-Tenant, string required

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

Request body

object required
file_id, string uuid required

Файл в хранилище кабинета

Response

Подготовленная загрузка

MailOutboundUpload required

Файл, загруженный до отправки письма. Ключ объектного хранилища наружу не отдаётся.

id, string uuid required
account_id, string uuid required
filename, string required
content_type, string required
size_bytes, integer required
scan_status, 'pending' | 'clean' | 'infected' | 'skipped' required

Состояние антивирусной проверки файла. pending существует потому, что письмо сохраняется целиком, а проверка идёт потоком: видеть письмо можно сразу, скачать вложение — только после вердикта.

status, 'ready' | 'consumed' | 'expired' required
expires_at, string date-time required
created_at, string date-time required

Changes

    • info

      added the optional property field to the response with the status

    • info

      added the optional property field to the response with the status

    • info

      added the optional property field to the response with the status

    7 more changes in this revision