> For the complete documentation index, see [llms.txt](https://docs.miatel.com/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.miatel.com/api/statistics-api/statistics-http-api.md).

# Statistics HTTP API

This API provides the ability to retrieve data, in JSON format, about SMS campaigns conducted by users of the Miatel platform.

### Access to the Statistics HTTP API

The private key `ip_auth_key` is generated on the Miatel side. To obtain the key, please contact support at <support@miatel.com>, providing your account on the Miatel platform and the IP addresses for whitelisting, or reach out to your personal manager.

### **Endpoint**

```
https://sms-hub2.miatel.ru/main-getData.php?
```

### Request parameters

| `ip_auth_key` | Unique authentication key issued to the user                                                                                                                  |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `time_beg`    | The start time of the period for which SMS campaign data is requested. Time is specified in GMT+0 format. (Format: Y-M-DTh:m:s, Example: 2023-07-25T00:00:00) |
| `time_end`    | The end time of the period for which SMS campaign data is requested. Time is specified in GMT+0 format. (Format: Y-M-DTh:m:s, Example: 2023-07-25T23:59:59)   |
| `get_names`   | Parameter determining whether to output a separate JSON with geo names. This parameter can only take the value of 1.                                          |

### Request example

{% code overflow="wrap" %}

```
https://sms-hub2.miatel.ru/main-getData.php?ip_auth_key=aaabbbcccddd&time_beg=2023-02-21T23:00:00&time_end=2023-02-21T23:05:59&get_names=1
```

{% endcode %}

### API limitations

* Maximum number of returned records: 100,000
* Maximum request period: 31 days
* Start and end time of the period are specified in GMT+0 format.
* The request period should be optimized to minimize data volume.
* Only one request at a time is allowed.


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.miatel.com/api/statistics-api/statistics-http-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
