# Удаление запланированного сообщения

{% tabs %}
{% tab title="XML" %}
Метод отправки **`POST`**

Кодировка XML-документов: **`UTF-8`**

Обязательный заголовок: **`Content-type: text/xml; charset=utf-8;`**

Адрес для запроса: **`https://my.smsclub24.ru/xml/scheduled.php`**

## Параметры запроса на отправку сообщения

| Параметр                                                                                                                                                                          | Тип    | Описание                                                                                                                             |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| <p>request</p><p><mark style="color:orange;">.security</mark></p><p><mark style="color:purple;">.login</mark></p><p><mark style="color:green;">\[value]\*</mark></p>              | String | Ваш логин в системе                                                                                                                  |
| <p>request</p><p><mark style="color:orange;">.security</mark></p><p><mark style="color:purple;">.password</mark></p><p><mark style="color:green;">\[value]\*</mark></p>           | String | Ваш пароль в системе                                                                                                                 |
| <p>request</p><p><mark style="color:orange;">.security</mark></p><p><mark style="color:purple;">.token</mark></p><p><mark style="color:green;">\[value]\*</mark></p>              | String | Вместо логина и пароля можно использовать секретный ключ. Для его получения обратитесь к менеджеру                                   |
| <p>request</p><p><mark style="color:orange;">.delete\_scheduled</mark></p><p><mark style="color:purple;">.scheduled</mark></p><p><mark style="color:green;">\[id\_sms]</mark></p> | Int    | <p>Номер запланированного сообщения, которое нужно удалить.</p><p><em>Можно получить при запросе списка запланированных SMS</em></p> |

\*- обязательный параметр

## В случае получения правильного XML-документа

```xml
<?xml version="1.0" encoding="utf-8" ?>
<response>
    <scheduled id_sms="1234">delete</scheduled>
    <scheduled id_sms="1235">not_found</scheduled>
    …
</response>
```

| Параметр                                                                                                                                                                | Тип    | Описание             |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------------------- |
| <p>response</p><p><mark style="color:orange;">.phones</mark></p><p><mark style="color:purple;">.scheduled</mark></p>                                                    | String | Выполненное действие |
| <p>response</p><p><mark style="color:orange;">.phones</mark></p><p><mark style="color:purple;">.scheduled</mark></p><p><mark style="color:green;">\[id\_sms]</mark></p> | Int    | Номер сообщения      |

## В случае возникновения ошибки в отправленном XML-документе

```xml
<?xml version="1.0" encoding="utf-8"?>
<response>
     <error>текст ошибки</error>
</response>
```

| Параметр                                                        | Тип    | Описание                                                                                                                                                                                                          |
| --------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p>response</p><p><mark style="color:orange;">.error</mark></p> | String | <p>Текст ошибки может принимать следующие значения:</p><ul><li>Неправильный формат XML документа</li><li>Ваш аккаунт заблокирован</li><li>Неправильный логин или пароль</li><li>POST данные отсутствуют</li></ul> |

## Пример XML запроса

```xml
<?xml version="1.0" encoding="utf-8" ?>
<request>
     <security>
          <login value="логин" />
          <password value="пароль" />
     </security>
     <delete_schedule>
          <schedule id_sms="1234" />
          <schedule id_sms="1235" />
          …
     </delete_schedule>
</request>
```

{% 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://sms-club.gitbook.io/smsclub24ru/udalenie-zaplanirovannogo-soobsheniya.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.
