> For the complete documentation index, see [llms.txt](https://docs.telefon-ip.ru/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.telefon-ip.ru/voip-api/poluchenie-istorii-zvonkov.md).

# Получение истории звонков

Запросы выполняются методом **GET** на URL:&#x20;

**<https://api.telefon-ip.ru/api/v1/**&#x63;allhistor&#x79;**/{token}/>**  где:&#x20;

**token  -** ключ доступа к API, который можете получить в личном кабинете или по запросу на <support@telefon-ip.ru>.&#x20;

***

<mark style="color:green;">`GET`</mark> `https://api.telefon-ip.ru/api/v1/`callhistory`/{{token}}/`

{% hint style="info" %}
Пример:

GET /api/v1/voip/callhistory/3ea85fbf-f5a9-4084-8a04-9733cd6fd0b0/?start\_date=20260801\&end\_date=20260803

{% endhint %}

#### Path Parameters

| Name                                    | Value  | Description                                                                                |
| --------------------------------------- | ------ | ------------------------------------------------------------------------------------------ |
| token<mark style="color:red;">\*</mark> | string | Ключ доступа                                                                               |
| start\_date                             | string | Начальная дата в формате `YYYYMMDD` (например, `20260801`). По умолчанию – вчерашняя дата. |
| end\_date                               | string | Конечная дата в формате `YYYYMMDD`. По умолчанию – текущая дата и время.                   |
|                                         |        |                                                                                            |

{% hint style="info" %}

* Если `start_date` не указан, берётся дата, равная `(текущая дата - 1 день)`.
* Если `end_date` не указан, берётся текущий момент времени.
  {% endhint %}

**Response**

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

```json
{
    "success": true,
    "error": "",
    "timezone": "Europe/Moscow",
    "data": [
        {
            "uniqueid": "1597532580.42",
            "calldate": "2026-08-01 10:15:30+03:00",
            "src": "74951234567",
            "dst": "79261234567",
            "duration": 85,
            "billsec": 80,
            "disposition": "ANSWERED",
            "userfield": "in-main",
            "direction": "in"
        },
        {
            "uniqueid": "1597532581.43",
            "calldate": "2026-08-01 11:20:10+03:00",
            "src": "79261234567",
            "dst": "74951234567",
            "duration": 45,
            "billsec": 40,
            "disposition": "ANSWERED",
            "userfield": "out-callback",
            "direction": "out"
        }
    ]
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "success": false,
    "error": "Incorrect data format field start_date, should be YYYYMMDD",
    "data": {}
}
```

{% endtab %}

{% tab title="404" %}

```json
{
    "success": false,
    "error": "Unauthorized token",
    "data": {}
}
```

{% endtab %}
{% endtabs %}
