Chat

Изменить своё текстовое сообщение

Changed on

Правка разрешена автору в течение 60 минут после создания сообщения; позже приходит 409. Правится только сообщение вида text и только неудалённое — чужое, удалённое и нетекстовое дают 403. Прежний текст уходит в append-only историю ревизий, в ответе сообщение с новым edited_at. Повтор того же текста ревизию не создаёт и edited_at не двигает.

patch/api/v1/chat/conversations/{id}/messages/{messageId}

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
messageId, string uuid required

Headers

X-Tenant, string required

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

Request body

ChatEditMessage required
body, string required

Лимит считается по кодовым точкам Unicode после нормализации переводов строк и обрезки пробелов по краям.

Response

Сообщение после правки

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
reactions, ChatMessageReaction[] 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

Example response

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

Changes

    • info

      added the optional property attachments/items/image_height to the response with the status

    • info

      added the optional property attachments/items/image_width to the response with the status

    • info

      endpoint added