> ## Documentation Index
> Fetch the complete documentation index at: https://docs.minimo.it/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Email Template Stats

> View delivery, open, and click statistics for email templates

## Overview

Track the performance of your email templates with detailed analytics including:

* **Delivery volume**: Total messages sent
* **Engagement rates**: Open rates and click rates
* **Metadata**: Creation timestamp

## Use Cases

<AccordionGroup>
  <Accordion title="Monitor Template Performance">
    Track which templates have the best engagement:

    ```javascript theme={null}
    const templates = await getTemplateList();

    for (const template of templates) {
      const response = await getTemplateStats(template.id);
      const stats = response.data;
      console.log(`${template.name}: ${stats.openRate} open rate`);
    }
    ```
  </Accordion>

  <Accordion title="A/B Testing">
    Compare performance between template variants:

    ```javascript theme={null}
    const responseA = await getTemplateStats('tmpl_variant_a');
    const responseB = await getTemplateStats('tmpl_variant_b');

    const rateA = parseFloat(responseA.data.clickRate);
    const rateB = parseFloat(responseB.data.clickRate);

    if (rateB > rateA) {
      console.log('Template B performs better');
    }
    ```
  </Accordion>

  <Accordion title="Dashboard Widgets">
    Display real-time stats in your application:

    ```javascript theme={null}
    async function updateDashboard() {
      const response = await getTemplateStats('tmpl_welcome');
      const stats = response.data;
      
      document.getElementById('sent-count').textContent = stats.totalMessagesSent;
      document.getElementById('open-rate').textContent = stats.openRate;
      document.getElementById('click-rate').textContent = stats.clickRate;
    }
    ```
  </Accordion>
</AccordionGroup>

## Response Example

```json theme={null}
{
  "data": {
    "created": "2026-06-11T09:50:39.760Z",
    "openRate": "0%",
    "clickRate": "0%",
    "totalMessagesSent": 1
  }
}
```

## Metrics Explained

| Metric              | Type      | Description                                                              |
| ------------------- | --------- | ------------------------------------------------------------------------ |
| `created`           | `string`  | Timestamp when the template/transactional message was created.           |
| `openRate`          | `string`  | Percentage of recipients who opened the message (e.g. "85%").            |
| `clickRate`         | `string`  | Percentage of recipients who clicked a link in the message (e.g. "50%"). |
| `totalMessagesSent` | `integer` | Total number of messages sent using this template.                       |

## Best Practices

### Monitoring Frequency

* **High-volume templates**: Check daily
* **Moderate-volume**: Check weekly
* **Low-volume**: Check monthly

### Setting Alerts

Monitor for engagement drops:

```javascript theme={null}
async function checkTemplateHealth(templateId) {
  const response = await getTemplateStats(templateId);
  const stats = response.data;

  const openRate = parseFloat(stats.openRate);
  if (openRate < 10) {
    alert('Low open rate detected - review subject line and sender name!');
  }
}
```

### Improving Performance

**Low open rate?**

* Test different subject lines
* Optimize send time
* Segment your audience better

**Low click rate?**

* Make CTAs more prominent
* Reduce content complexity
* Test different button styles

## Related Endpoints

* [Send Email Template](/api-reference/messaging-channels/email/send-template) - Send emails with this template
* [List Email Templates](/api-reference/messaging-channels/email/list-templates) - View all templates


## OpenAPI

````yaml get /public/v1/transactionals/{id}/stats
openapi: 3.1.0
info:
  title: API Documentation
  description: Documentation for transactional and subscribe APIs
  version: 1.0.0
servers:
  - url: https://app.minimo.it
security:
  - bearerAuth: []
paths:
  /public/v1/transactionals/{id}/stats:
    servers:
      - url: https://api.minimo.it
    get:
      summary: Retrieve Transactional Detail and Statistics
      description: >-
        Get detailed information and statistics for a specific transactional
        message using its ID.
      parameters:
        - name: id
          in: path
          required: true
          description: The unique ID of the transactional message.
          schema:
            type: integer
            example: 123
      responses:
        '200':
          description: Successful response with transactional detail and statistics.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: object
                    required:
                      - created
                      - openRate
                      - clickRate
                      - totalMessagesSent
                    properties:
                      created:
                        type: string
                        format: date-time
                        description: Timestamp when the transactional message was created.
                        example: '2026-06-11T09:50:39.760Z'
                      openRate:
                        type: string
                        description: Percentage of recipients who opened the message.
                        example: 0%
                      clickRate:
                        type: string
                        description: >-
                          Percentage of recipients who clicked a link in the
                          message.
                        example: 0%
                      totalMessagesSent:
                        type: integer
                        description: >-
                          Total number of messages sent for this transactional
                          message.
                        example: 1
        '400':
          description: Unauthorized access due to missing or invalid token.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message.
                    example: Missing API client ID or API key
        '404':
          description: Transactional message not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message.
                    example: Transactional not found
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: mn-API_CLIENT_ID-API_KEY

````