> For the complete documentation index, see [llms.txt](https://apidocs.webcom.mobi/ru2/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.webcom.mobi/ru2/type/specifikaciya-xml.md).

# Спецификация XML

Метод отправки всегда **`POST`**

В заголовках запроса всегда должен содержать&#x20;

```
Content-type: text/xml; charset=utf-8;
```

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

Передаваемый XML-документ не должен содержать переводов строки

Переводы строк в самих данных должны быть заменены на **`/n`**

#### Адрес сервера для отправки запросов

<mark style="color:red;">`http://lk.mysmpp.ru`</mark>

### Примеры передачи XML

{% tabs %}
{% tab title="PHP" %}
{% code overflow="wrap" %}

```php
// XML-документ
$src = '<?xml version="1.0" encoding="utf-8"?><request><security><login value="логин" /><password value="пароль" /></security></request>';  
// адрес серера
$href = 'http://server/script.php'; 
$res = '';
$ch = curl_init();
      curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: text/xml; charset=utf-8'));
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($ch, CURLOPT_CRLF, true);
    	 curl_setopt($ch, CURLOPT_POST, true);
 curl_setopt($ch, CURLOPT_POSTFIELDS, $src);
 curl_setopt($ch, CURLOPT_URL, $href);
 $result = curl_exec($ch);
 $res = $result;
 curl_close($ch);
 echo $res;

```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://apidocs.webcom.mobi/ru2/type/specifikaciya-xml.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.
