---
docId: doc_8f90a6d991ee409a80a2dcd6563a26ac
title: Template analytics
description: "Read sends, reads, clicks, and cost for one template version."
api:
  group: mensajes/plantillas
  auth: bearer
  operations:
    - operationId: getWhatsAppTemplateAnalytics
      method: GET
      path: '/v1/whatsapp/templates/{name}/analytics'
      postmanName: Template Analytics
---

<script>
  import { Ways, Note, Collapsible } from '$lib/components';
</script>

# Template analytics

Read sent, delivered, read, and clicked messages for one language version of a WhatsApp template, along with their cost. The response includes a period total and one row per day using Meta data.

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl "https://api.platic.ai/v1/whatsapp/templates/$TEMPLATE_NAME/analytics?days=7" \
  -H "Authorization: Bearer $PLATIC_API_KEY"
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
const analytics = await platic.whatsapp.templates.analytics("order_update", { days: 7 });
```

</Ways.Way>
</Ways>

## Path parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `name` | string | Exact name of the template | ✓ |

## Query parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `workspace` | string | Workspace ID. Required if your credential covers several workspaces ([list workspaces](/api-reference/workspaces)); without it the answer is `400` | If the credential has several |
| `language` | string | The language version, such as `es_MX`. Without it, the same version that [get a template](/api-reference/whatsapp-templates/get#which-version-answers) answers | — |
| `wabaId` | string | The template's WhatsApp Business account (WABA). Only needed if the same name exists in several | — |
| `days` | integer | Days back, from 1 to 90. Without it, 30 | — |
| `start` | string | First day, `YYYY-MM-DD` in UTC. Goes together with `end` and wins over `days` | — |
| `end` | string | Last day included, `YYYY-MM-DD` in UTC. Goes together with `start`. The period is up to 90 days | — |

## Response

```json
{
  "status": "success",
  "data": {
    "name": "order_update",
    "language": "es_MX",
    "templateId": "1234567890123456",
    "wabaId": "155512345678901",
    "workspaceId": "K7u9rQ2LmZx18BvC5tNd",
    "start": "2026-11-11",
    "end": "2026-11-13",
    "days": 3,
    "insightsEnabled": true,
    "unsupported": false,
    "summary": {
      "sent": 420,
      "delivered": 410,
      "read": 300,
      "clicked": 45,
      "cost": 12.6,
      "deliveryRate": 0.976,
      "readRate": 0.7317,
      "clickRate": 0.1098,
      "clickedByButton": [
        { "type": "quick_reply_button", "label": "On my way", "count": 45 }
      ]
    },
    "daily": [
      { "date": "2026-11-11", "sent": 200, "delivered": 196, "read": 150, "clicked": 20, "cost": 6 },
      { "date": "2026-11-12", "sent": 150, "delivered": 146, "read": 110, "clicked": 18, "cost": 4.5 },
      { "date": "2026-11-13", "sent": 70, "delivered": 68, "read": 40, "clicked": 7, "cost": 2.1 }
    ]
  }
}
```

| Field | Description |
|-------|-------------|
| `name`, `language`, `templateId`, `wabaId` | The version measured |
| `start`, `end`, `days` | The period, in UTC days. `end` is included |
| `summary.sent`, `delivered`, `read`, `clicked` | Totals for the period |
| `summary.cost` | What the sends cost, in the currency of the WhatsApp account. `null` if Meta did not give the cost |
| `summary.deliveryRate` | `delivered / sent`, from 0 to 1 |
| `summary.readRate` | `read / delivered`, from 0 to 1 |
| `summary.clickRate` | `clicked / delivered`, from 0 to 1 |
| `summary.clickedByButton` | Clicks per button: `type` (Meta's, such as `quick_reply_button` or `url_button`), `label` and `count`, from most to least used. A `type` that starts with `unique_` counts distinct people and does not add to `clicked` |
| `daily` | One row per day with data: `date`, `sent`, `delivered`, `read`, `clicked` and `cost` |
| `insightsEnabled` | `false` if the WABA does not have template statistics turned on |
| `unsupported` | `true` if Meta does not provide these statistics in the account's region, such as the European Union or Japan |
| `note` | Only with `insightsEnabled: false` or `unsupported: true`: what is happening and what to do |

<Note type="tip">

If `insightsEnabled` is `false`, follow `note` to enable analytics in Meta's WhatsApp Manager. You only need to enable it once. Until then, totals are zero.

</Note>

## Errors

<Collapsible summary="Show error codes and fixes">

| Status | `details.code` | When |
|--------|----------------|------|
| `400` | `INVALID_REQUEST` | A parameter is not valid: `days` outside 1 to 90, `start` without `end`, `end` before `start` or a period longer than 90 days. `details.issues` says which |
| `400` | `INVALID_REQUEST` | Your credential covers several workspaces and you did not send `?workspace=`, or you sent one it does not cover. `details.available` has the IDs you can use |
| `401` | `UNAUTHENTICATED` | The credential is missing or not valid |
| `403` | `FORBIDDEN` | The person has no permission in Conversations or Campaigns. The message is `Missing conversations or campaigns permission` |
| `404` | `TEMPLATE_NOT_FOUND` | No template has that name, or it does not have that language. In the second case `details.languages` lists the ones it has |
| `404` | `WABA_NOT_FOUND` | The workspace has no connected WABA, or `wabaId` is not one of its own. `details.available` lists the ones it has |
| `404` | `WORKSPACE_NOT_FOUND` | The workspace does not exist |
| `409` | `LEGACY_PROVIDER` | The workspace sends WhatsApp through MessageBird. Analytics come from Meta and are only available for workspaces connected to Meta directly |
| `409` | `WHATSAPP_TOKEN_INVALID`, `WHATSAPP_PERMISSION_DENIED`, `WHATSAPP_ACCOUNT_RESTRICTED` | The WABA could not be read through its WhatsApp account. Reconnect the account in Platica |
| `429` | `RATE_LIMITED` | WhatsApp is rate limiting the account's requests. Wait a few minutes and try again |
| `502` | `UPSTREAM_ERROR` | Platica could not reach WhatsApp. Try again in a moment |
| `503` | `TEMPORARILY_UNAVAILABLE` | Platica could not read the workspace or its WABAs. Try again in a moment |
| `504` | `UPSTREAM_TIMEOUT` | WhatsApp did not answer in time. Try again in a moment |

```json
{
  "code": 409,
  "error": "Conflict - The resource state conflicts with this request",
  "details": {
    "code": "LEGACY_PROVIDER",
    "message": "This workspace sends WhatsApp through MessageBird (legacy). Template analytics come from Meta and are only available for workspaces connected to Meta directly."
  }
}
```

The general error format is in [Errors](/api-reference/errors).

</Collapsible>

## Notes

- Platica caches the figures for a few minutes if the period includes today, and for a day if it has already closed.
- To compare languages, request each version with `?language=`.
- From an AI agent, the tool is [`get_whatsapp_template_analytics`](/mcp/tools#whatsapp-templates).
