---
title: "Fetch template aggregated analytics"
method: GET
path: "/analytics/templates"
tags: ["Templates"]
---

# Fetch template aggregated analytics

`GET /analytics/templates`

Returns aggregated engagement counts and rates for multiple templates within the specified date range. Request body specifies template IDs and from/to. Each result includes template_id and the analytics object with period, absolute counts, and rates. Missing or inaccessible template IDs are omitted from results.

## Query parameters

- `from` string, date-time, required
- `template_ids` string[], required
- `to` string, date-time, required

## Response `200`

OK

- TemplateAnalyticsResponseDTO
  - `url` string — The URL of the analytics resource
  - `period` TemplateAnalyticsPeriodDTO
    - `from` string, date-time
    - `to` string, date-time
  - `results` TemplateAnalyticsResultDTO[] — The analytics results for the requested templates
    - `template_id` string — The ID of the analyzed template
    - `sending_attempted` TemplateAnalyticsCountWithRateDTO
      - `total` integer — The total number of events
      - `rate` number, double — The rate of the event
    - `delivered` TemplateAnalyticsCountWithRateDTO
      - `total` integer — The total number of events
      - `rate` number, double — The rate of the event
    - `failed` TemplateAnalyticsCountWithRateDTO
      - `total` integer — The total number of events
      - `rate` number, double — The rate of the event
    - `read` TemplateAnalyticsCountWithRateDTO
      - `total` integer — The total number of events
      - `rate` number, double — The rate of the event
    - `clicked` TemplateAnalyticsClickedDTO
      - `applicable` boolean — Whether click analytics apply to this template
      - `buttons` TemplateAnalyticsButtonClickDTO[] — The click analytics for each button
        - `type` string — The type of clicked button
        - `label` string — The label of the clicked button
        - `total` integer — The total number of clicks
        - `rate` number, double — The click rate
    - `freeform_replied` TemplateAnalyticsCountWithRateDTO
      - `total` integer — The total number of events
      - `rate` number, double — The rate of the event

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.dev/superchat/apis/superchat-api.md) · [All operations](https://skmtc.dev/superchat/apis/superchat-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/superchat/superchat-api/revisions/3bc557a0072f/schema)
