CRM links

Отправить письмо из карточки

Changed on

Письмо уходит из выбранного ящика модуля «Почта» (account_id — из crmListMailAccounts): встаёт в очередь отправки и появляется в «Отправленных» ящика, а его переписка привязывается к записи; в ленте записи — факт mail_sent. in_reply_to_id — ответ на письмо: уходит в ту же переписку из того же ящика. Нужны адресат и тема или текст — иначе 422 crm.mail_invalid. Письмо уходит внешнему адресату, и после принятия почтовым сервером его не отозвать. Ящик или письмо не видны — 403 crm.mail_not_visible; нет права mail на запись — 403 crm.mail_forbidden; модуль «Почта» не подключён — 409 crm.module_unavailable.

post/api/v1/crm/{entity}/{id}/mail

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

entity, 'lead' | 'deal' | 'customer' required

Тип записи CRM, у которой есть лента, заметки и дела: лид, сделка или клиент

id, string uuid required

Headers

X-Tenant, string required

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

Request body

CRMCardMailSendRequest required

Письмо из карточки. Нужны адресат и тема или текст

account_id, string uuid required
to, string[] required

Адресаты, по одному адресу в строке

cc, string[]

Копия, по одному адресу в строке

subject, string
body_text, string

Текст письма

in_reply_to_id, string uuid nullable

Response

Письмо отправлено, переписка привязана

CRMMailLink required

Связь переписки модуля «Почта» с лидом, сделкой или клиентом

id, string uuid required
entity_type, 'lead' | 'deal' | 'customer' required
entity_id, string uuid required
account_id, string uuid required
thread_id, string uuid required
message_id, string uuid required
source, 'sent' | 'linked' | 'intake' required

sent - письмо отправлено из карточки, linked - сотрудник привязал письмо, intake - письмо пришло в ящик, из которого CRM сама заводит лиды и сделки

linked_by, integer required
linked_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

    11 more changes in this revision