> For the complete documentation index, see [llms.txt](https://apidocs.webcom.mobi/en/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/en/sposoby-vzaimodeistviya-s-a2p-platformoi/json-specification.md).

# JSON specification

The formats of requests and responses to the API comply with the specification [JSON API v1.0](http://jsonapi.org/format/1.0).

The method of dispatch is always **`POST`**

Query headers should always contain&#x20;

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

JSON document encoding: **`UTF-8`**

#### Server address for sending requests

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

### Examples of JSON transfer

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

<pre class="language-php"><code class="lang-php">&#x3C;?php
    // JSON-document
    $src = json_encode([
        "login" => "login",
        "password" => "password"
    ]);
    // server address
<strong>    $href = 'http://server/script.php';
</strong>    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: text/json; 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);
    curl_close($ch);
    echo $result;
</code></pre>

{% 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/en/sposoby-vzaimodeistviya-s-a2p-platformoi/json-specification.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.
