# WhatsApp - отправка sms

Для отправки сообщений Вам необходимо в личном кабинете TELEFON-IP.RU привязать WhatsApp через связанные устройства  в разделе рассылки.

Запросы выполняются методом **GET, POST** на URL:&#x20;

**<https://api.telefon-ip.ru/whatsapp/{action}/{token}>**  где:&#x20;

**token  -** ключ доступа к API, который можете получить в личном кабинете в разделе Профиль или по запросу на <support@telefon-ip.ru>.&#x20;

**action** - вызываемые функции API описанные ниже в документации

## send\_messages - отправка сообщения

## send\_messages

GET `/send_messages`

**Example:** <https://api.telefon-ip.ru/whatsapp/send\\_messages/4ea13fbf-f5a3-4084-8b01-9733cd6fd0b1?phone=79243555100\\&message=test>

**Query Params**

| Name    | Type   | Description                                                             |
| ------- | ------ | ----------------------------------------------------------------------- |
| phone   | string | Номер телефона в формате 79xxxxxxxxx                                    |
| message | string | Текст сообщения                                                         |
| app     | int    | Индификатор приложения whatsapp (не обязательно, при одном подключении) |

**Response**

{% tabs %}
{% tab title="200" %}

<pre class="language-json"><code class="lang-json">{
    "success": true,
    "value": {
        "id": "3EB0FF941278E7AF3F506C",
        "status": 1,
        "message": "test",
        "remoteJid": "79243555100@s.whatsapp.net"
    }
<strong>}
</strong></code></pre>

{% endtab %}

{% tab title="400" %}

```json
{
    "success": false,
    "error": "Blocking a client by balance",
    "data": {}
}
```

{% endtab %}

{% tab title="401" %}

```json
{
    "success": false,
    "error": "Unauthorized token",
    "data": {}
}
```

{% 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://docs.telefon-ip.ru/reference/whatsapp-otpravka-sms.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.
