# Отправка сообщения оператором чат-центра

Все сообщения отправляемые операторами чат-центра приходят с типом события  `operator_replied`.

{% hint style="info" %}

### Типы сообщений

* text — текстовое сообщение
* image — изображение
* document — файл
  {% endhint %}

#### 1. Текстовое сообщение (полный webhook)

{% code overflow="wrap" %}

```json
{
  "event_type": "operator_replied",
  "payload": {
    "chat": {
      "uuid": "uuid чата",
      "avatar": "аватар пользователя",
      "platform": "мессенджер",
      "phone": "номер телефона",
      "name": "имя пользователя"
    },
    "profile": {
      "uuid": "uuid профиля"
    },
    "message": {
      "uuid": "uuid сообщения",
      "type": "text",
      "text": "Тут какое-то сообщение от оператора"
    },
    "session": {
      "title": null,
      "context": null,
      "team": {
        "id": "id команды",
        "name": "название команды"
      },
      "operator": {
        "uuid": "uuid оператора",
        "name": "имя оператора",
        "avatar": null
      },
      "integration": null
    }
  },
  "timestamp": 1777966575024
}
```

{% endcode %}

<details>

<summary><strong>Описание параметров</strong></summary>

#### chat

* `uuid` — уникальный идентификатор чата&#x20;
* `avatar` — аватар пользователя (при наличии)
* `platform` — канал (Telegram, WhatsApp и т.д.)
* `phone` — телефон (если доступен)
* `name` — имя пользователя

#### profile

* `uuid` — идентификатор профиля пользователя

#### session

* `title` — заголовок чат-сессии (может быть null)
* `context` — контекст чат-сессии (может быть null)
* `team.id` — ID команды (число)
* `team.name` — название команды
* `operator.uuid` — uuid оператора
* `operator.name` — имя оператора
* `operator.avatar` — аватар оператора

#### message

* `uuid` — уникальный ID сообщения
* `type` — тип текстового сообщения
* `text` — содержимое сообщения

</details>

### 2. Изображение

<pre data-overflow="wrap"><code><strong>{
</strong>   // ...
    "message": {
      "uuid": "uuid сообщения",
      "type": "image",
      "url": "ссылка на изображение"
    },
    // ...
}
</code></pre>

<details>

<summary><strong>Описание параметров</strong></summary>

#### message

* `uuid` — уникальный ID сообщения
* `type` — тип сообщения при отправке пользователю изображения
* `url` — ссылка на изображение

</details>

### 3. Файл

<pre data-overflow="wrap"><code><strong>{
</strong>   // ...
    "message": {
      "uuid": "uuid сообщения",
      "type": "document",
      "url": "ссылка на файл"
    },
    // ...
}
</code></pre>

<details>

<summary><strong>Описание параметров</strong></summary>

#### message

* `uuid` — уникальный ID сообщения
* `type` — тип сообщения при отправке пользователю файла
* `url` — ссылка на файл

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fstrk.io/knowledge_base/intagrations/sobstvennaya-crm-and-cdp-new/otpravka-soobsheniya-operatorom-chat-centra.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
