# Рассылка

## Отправить текстовое сообщение

<mark style="color:green;">`POST`</mark> `https://app.onebot.tech/api/v1/sendMessageToQueue`

#### Request Body

| Name                | Type    | Description                                                                                |
| ------------------- | ------- | ------------------------------------------------------------------------------------------ |
| message\_id         | String  | Уникальный id сообщения                                                                    |
| text                | String  | Текст сообщения                                                                            |
| contact\_id         | Integer | ID контакта LeadTex. Обязательный параметр когда `bitrix_contact_id` и phone не переданы   |
| bitrix\_contact\_id | Integer | ID контакта Битрикса (обязательный параметр когда `contact_id` и phone не переданы)        |
| phone               | String  | Номер телефона (обязательный параметр когда bitrix\_contact\_id и contact\_id не переданы) |

{% tabs %}
{% tab title="201: Created Сообщение успешно добавлено в очередь на отправку" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}


---

# 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://help.onebot.tech/onebot-help/rabota-s-api-platformy/rassylka.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.
