# Get inbox response-time stats

Fetches inbox response-time stats.

```http
GET https://api.pozy.ai/v1/analytics/inbox/response-time
```

- Area: Analytics / Inbox Analytics
- Auth: Authorization: Bearer pz_live_...

## Query parameters

- `fromDate` (string (date), required)
- `toDate` (string (date))
- `profileId` (string)
- `platform` (string)
- `accountId` (string)

## Example request

```bash
curl -X GET "https://api.pozy.ai/v1/analytics/inbox/response-time?fromDate=2026-10-01" \
  -H "Authorization: Bearer $POZY_API_KEY"
```

```ts
const res = await fetch("https://api.pozy.ai/v1/analytics/inbox/response-time?fromDate=2026-10-01", {
  headers: { Authorization: `Bearer ${process.env.POZY_API_KEY}` },
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.get(
    "https://api.pozy.ai/v1/analytics/inbox/response-time",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    params={
        "fromDate": "2026-10-01",
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `success`, boolean
- `from`, string (date)
- `to`, string (date): Can be null
- `summary`, object
  - `sampleSize`, integer
  - `medianSeconds`, integer
  - `p90Seconds`, integer
  - `p99Seconds`, integer
  - `meanSeconds`, integer
  - `fastestSeconds`, integer
  - `slowestSeconds`, integer
- `histogram`, array of object
  - `bucket`, string
  - `lowerSeconds`, integer
  - `upperSeconds`, integer: Can be null
  - `count`, integer

```json
{
  "success": true,
  "from": "2026-10-01",
  "to": "2026-10-01",
  "summary": {
    "sampleSize": 1,
    "medianSeconds": 1,
    "p90Seconds": 1,
    "p99Seconds": 1,
    "meanSeconds": 1,
    "fastestSeconds": 1,
    "slowestSeconds": 1
  },
  "histogram": [
    {
      "bucket": "string",
      "lowerSeconds": 1,
      "upperSeconds": 1,
      "count": 42
    }
  ]
}
```
