> For the complete documentation index, see [llms.txt](https://docs.fstrk.io/knowledge_base/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fstrk.io/knowledge_base/channels/svoi-kanal-api/iskhodyashie-sobytiya-i-soobsheniya-ot-bota-i-operatora.md).

# Исходящие события и сообщения (от бота и оператора)

## Сообщение от оператора

```json
{
  "chat": {
    "client_id": "e937a119-baf5-4aa4-aa21-42795043e236",
    "uuid": "eece0483-18d3-4afe-97d5-f4dcea3f9d11"
  },
  "id": "8545eba1-db6e-421b-bcf1-19b3275d4f2f",
  "payload": {
    "text": "Текст сообщения",
    "type": "text"
    },
  "sender": {
    "avatar": null,
    "name": "Александр",
    "type": "operator"
  },
  "timestamp": 1744213501302
}
```

## Сообщение от бота (без кнопок)

```json
{
  "chat": {
    "client_id": "e937a119-baf5-4aa4-aa21-42795043e236",
    "uuid": "eece0483-18d3-4afe-97d5-f4dcea3f9d11"
  },
  "id": "8545eba1-db6e-421b-bcf1-19b3275d4f2f",
  "payload": {
    "text": "Текст сообщения",
    "type": "text"
  },
  "sender": {
    "avatar": null,
    "name": null,
    "type": "operator"
  },
  "timestamp": 1744213501302
}
```

## Сообщение от бота (с кнопками)

```json
{
  "chat": {
    "client_id": "e937a119-baf5-4aa4-aa21-42795043e236",
    "uuid": "eece0483-18d3-4afe-97d5-f4dcea3f9d11"
  },
  "id": "6a4b1bb2-856e-42e4-9d4c-a2000034c5bb",
  "payload": {
    "qr_buttons": [
      {
        "payload": "{\"data\": \"/switch/Тест 1/\", \"generated_by_node_pk\": 1, \"button_text\": \"Кнопка-узел\"}",
        "title": "Кнопка-узел",
        "type": "postback"
      },
      {
        "title": "Кнопка-ссылка",
        "type": "web_url",
        "url": "https://ya.ru/"
      },
      {
        "payload": "{\"data\": \"/text/Это текст\", \"generated_by_node_pk\": 1, \"button_text\": \"Кнопка-текстовый ответ\"}",
        "title": "Кнопка-текст",
        "type": "postback"
      }
    ],
    "text": "Текст сообщения",
    "type": "text"
  },
  "sender": {
    "avatar": null,
    "name": "TestBot",
    "type": "bot"
  },
  "timestamp": 1744213682863
}
```
