Template analytics

SDK platic.whatsapp.templates.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

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

Path parameters

ParameterTypeDescriptionRequired
namestringExact name of the template✓

Query parameters

ParameterTypeDescriptionRequired
workspacestringWorkspace ID. Required if your credential covers several workspaces (list workspaces); without it the answer is 400If the credential has several
languagestringThe language version, such as es_MX. Without it, the same version that get a template answers—
wabaIdstringThe template's WhatsApp Business account (WABA). Only needed if the same name exists in several—
daysintegerDays back, from 1 to 90. Without it, 30—
startstringFirst day, YYYY-MM-DD in UTC. Goes together with end and wins over days—
endstringLast day included, YYYY-MM-DD in UTC. Goes together with start. The period is up to 90 days—

Response

{
  "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 }
    ]
  }
}
FieldDescription
name, language, templateId, wabaIdThe version measured
start, end, daysThe period, in UTC days. end is included
summary.sent, delivered, read, clickedTotals for the period
summary.costWhat the sends cost, in the currency of the WhatsApp account. null if Meta did not give the cost
summary.deliveryRatedelivered / sent, from 0 to 1
summary.readRateread / delivered, from 0 to 1
summary.clickRateclicked / delivered, from 0 to 1
summary.clickedByButtonClicks 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
dailyOne row per day with data: date, sent, delivered, read, clicked and cost
insightsEnabledfalse if the WABA does not have template statistics turned on
unsupportedtrue if Meta does not provide these statistics in the account's region, such as the European Union or Japan
noteOnly with insightsEnabled: false or unsupported: true: what is happening and what to do

Errors

Statusdetails.codeWhen
400INVALID_REQUESTA 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
400INVALID_REQUESTYour 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
401UNAUTHENTICATEDThe credential is missing or not valid
403FORBIDDENThe person has no permission in Conversations or Campaigns. The message is Missing conversations or campaigns permission
404TEMPLATE_NOT_FOUNDNo template has that name, or it does not have that language. In the second case details.languages lists the ones it has
404WABA_NOT_FOUNDThe workspace has no connected WABA, or wabaId is not one of its own. details.available lists the ones it has
404WORKSPACE_NOT_FOUNDThe workspace does not exist
409LEGACY_PROVIDERThe workspace sends WhatsApp through MessageBird. Analytics come from Meta and are only available for workspaces connected to Meta directly
409WHATSAPP_TOKEN_INVALID, WHATSAPP_PERMISSION_DENIED, WHATSAPP_ACCOUNT_RESTRICTEDThe WABA could not be read through its WhatsApp account. Reconnect the account in Platica
429RATE_LIMITEDWhatsApp is rate limiting the account's requests. Wait a few minutes and try again
502UPSTREAM_ERRORPlatica could not reach WhatsApp. Try again in a moment
503TEMPORARILY_UNAVAILABLEPlatica could not read the workspace or its WABAs. Try again in a moment
504UPSTREAM_TIMEOUTWhatsApp did not answer in time. Try again in a moment
{
  "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.

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.