# Statistik surel

> Setiap hari dikirim, dikirim dan dihitung.

`GET /emails/stats`

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

## Parameter pertanyaan

- `days` (number): Panjang rentang: `7`, `14` atau `30`. Bandingkan dengan 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 }
}
```
