# Last-30-days rollup

> Returns aggregate counts for the trailing 30 days — conversations, messages, leads captured, and resolution rate — for the workspace, or for one chatbot when `chatbot_id` is supplied.

Source: https://www.hey.support/docs/api/analytics/get-analytics-summary

---

<ApiEndpoint method="GET" path="/analytics/summary" />

## Query parameters

<TypeTable
  type={{
  "chatbot_id": { type: "string", description: "Sqid-encoded chatbot id. Scopes results to one chatbot.", required: false }
}}
/>

## Response `200`

<TypeTable
  type={{
  "window": { type: "\"30d\"", description: "", required: true },
  "totals": { type: "object", description: "", required: true },
  "by_day": { type: "object[]", description: "", required: true }
}}
/>

### Errors

* `401` — Missing or invalid API key
* `429` — Rate limit exceeded

Every error shares [one envelope](/docs/api/errors).

## Example

```bash
curl https://www.hey.support/api/v1/analytics/summary \
  -H 'Authorization: Bearer hs_live_…'
```
