# Статистика електронної пошти

> Щоденні дані про відправлені, доставлені та відкинуті повідомлення.

`GET /emails/stats`

Returns one entry per day plus totals for the range. Requires a Full access key.

## Параметри запиту

- `days` (number): Довжина діапазону: `7`, `14` або `30`. Типове значення — 7.

## Example

cURL

```
curl -X GET 'https://sendtern.com/emails/stats?days=7' \
  -H 'Authorization: Bearer st_your_api_key'
```

Node.js

```
const res = await fetch("https://sendtern.com/emails/stats?days=7", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.SENDTERN_API_KEY}`,
  },
});

const data = await res.json();
```

Python

```
import os
import requests

res = requests.get(
    "https://sendtern.com/emails/stats?days=7",
    headers={"Authorization": f"Bearer {os.environ['SENDTERN_API_KEY']}"},
)

print(res.json())
```

## Response

```json
{
  "series": [
    { "date": "2026-11-21", "label": "Nov 21", "sent": 412, "delivered": 405, "bounced": 7 }
  ],
  "totals": { "sent": 2814, "delivered": 2770, "bounced": 44 }
}
```
