# Request to add senders

{% hint style="info" %}
The sender can only consist of 11 Latin characters, numbers, spaces and "'?><,.-\_=+/"!@#$%^&\*() " or 15 digits
{% endhint %}

## Request to add senders

<mark style="color:green;">`POST`</mark> `http://lk.mysmpp.ru/xml/add_originator.php`

#### Headers

| Name                                           | Type   | Description                    |
| ---------------------------------------------- | ------ | ------------------------------ |
| Content-type<mark style="color:red;">\*</mark> | String | **`text/xml; charset=utf-8;`** |

#### Request Body

| Name                                                            | Type   | Description                                                                                       |
| --------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------- |
| login.value<mark style="color:red;">\*</mark>                   | String | Your login in the system                                                                          |
| token.value<mark style="color:red;">\*</mark>                   | String | You can use a secret key instead of login and password. To obtain it, please contact your manager |
| password.value<mark style="color:red;">\*</mark>                | String | Your password in the system                                                                       |
| originator.template<mark style="color:red;">\*</mark>           | String | Template text                                                                                     |
| originator.name\_counterparty<mark style="color:red;">\*</mark> | String | Name of counter party                                                                             |
| originator.OGRN<mark style="color:red;">\*</mark>               | Int    | OGRN of the organization                                                                          |
| originator.KPP<mark style="color:red;">\*</mark>                | Int    | CAT of the organization                                                                           |
| originator.INN<mark style="color:red;">\*</mark>                | Int    | TIN of the organization                                                                           |
| originator<mark style="color:red;">\*</mark>                    | String | Sender to be added                                                                                |
| operator.MNC                                                    | Int    | Operator's mobile code                                                                            |
| operator.MCC                                                    | Int    | Mobile country code                                                                               |
| originator.comment                                              | String | Commentary                                                                                        |
| file.id                                                         | Int    | Id of the file to be uploaded                                                                     |
| file.href                                                       | String | Link to downloadable file                                                                         |

{% tabs %}
{% tab title="200: OK If a valid XML document is received" %}

```xml
<?xml version="1.0" encoding="utf-8" ?>
<response>
     <originator id_originator="">The sender is queued for registration.</originator>
</response>
```

{% endtab %}

{% tab title="400: Bad Request If an error occurs in the sent XML document" %}

```xml
<?xml version="1.0" encoding="utf-8"?>
<response>
     <error>Error message</error>
</response>
```

{% endtab %}
{% endtabs %}

### Deciphering parameters in query responses

<table><thead><tr><th width="170.33333333333331">Parameter</th><th width="133">Data type</th><th>Description</th></tr></thead><tbody><tr><td>originator</td><td>String</td><td><p>The result of adding a sender. Can contain the following values: Sender added. </p><ul><li>The sender is queued for registration. </li><li>The sender can only consist of 11 Latin characters, numbers, spaces and symbols"\'?>&#x3C;,.-_=+/"!@#$%^&#x26;*() " or 15 digits</li></ul></td></tr><tr><td>originator.id_originator</td><td>Int</td><td>Unique number of the sender in the system</td></tr><tr><td>error</td><td>String</td><td><p>The error text can take the following values:</p><ul><li>Incorrect XML document format </li><li>Incorrect login or password </li><li>POST data is missing</li></ul></td></tr></tbody></table>

### Example XML request

```xml
<?xml version="1.0" encoding="utf-8" ?>
<request>
    <security>
        <login value="login" />
        <password value="password" />
    </security>
    <originator INN="INN" KPP="KPP" OGRN="OGRN" name_counterparty="counterparty name" template="template text" comment="comment">Sender</originator>
    <operator MCC="" MNC="" />
    ...
    <operator MCC="" MNC="" />
    <file href="http://..." id="1" />
    ...
    <file href="http://..." id="4" />
</request>
```


---

# 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://apidocs.webcom.mobi/en/sposoby-vzaimodeistviya-s-a2p-platformoi/xml-specification/request-to-add-senders.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.
