Chat

Получить доступный чат

Недоступный, покинутый и отсутствующий чат одинаково возвращают 404.

get/api/v1/chat/conversations/{id}

Request

  • Base URL: https://erp.akeda.ru
  • URL: https://erp.akeda.ru/api/v1/chat/conversations/{id}
  • 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)

Response

Чат и вычисленные server capabilities

idstring uuid required
type'direct' | 'group' | 'system' required
status'active' | 'archived' required
titlestring required
descriptionstring required
last_seqinteger required
last_message_idstring uuid required
last_message_atstring date-time nullable required
created_atstring date-time required
updated_atstring date-time required
unread_countinteger required
first_unread_seqinteger nullable required
manual_unread_seqinteger nullable required
notification_modestring required
notification_muted_untilstring date-time nullable

До какого момента беседа молчит, если звук выключен на время: пока срок не вышел, notification_mode = muted. После срока поле пустое, а режим снова прежний

notification_mode_after_mute'all' | 'mentions' | 'null' nullable

Какой режим вернётся, когда выйдет срок «без звука»; есть только пока срок идёт. По нему «Включить звук» возвращает прежний выбор

mention_countinteger required
originstring
origin_refstring uuid
last_read_seqinteger
others_read_seqinteger
has_avatarboolean
avatar_urlstring
peer_user_idinteger nullable
peer_avatar_urlstring

Example response

{
  "preview": {
    "attachments": [
      {
        "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.