Template analytics (WABA scoped)
const url = 'https://example.com/v1/example/template_analytics?start=1760054400&end=1760659200&granularity=DAILY&tz=UTC&group_by=template&product_type=ALL&metric_types=SENT%2CDELIVERED%2CREAD%2CFAILED%2CCLICKED&sort_by=sent_count&sort_order=desc&page=1&limit=50&include_inactive=false';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/v1/example/template_analytics?start=1760054400&end=1760659200&granularity=DAILY&tz=UTC&group_by=template&product_type=ALL&metric_types=SENT%2CDELIVERED%2CREAD%2CFAILED%2CCLICKED&sort_by=sent_count&sort_order=desc&page=1&limit=50&include_inactive=false' \ --header 'Authorization: Bearer <token>'Retrieve WhatsApp template delivery and button-click analytics scoped to a specific WABA (internal UUID or Meta WABA ID). Strictly read-only.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”WABA internal UUID or Meta WABA ID
Query Parameters
Section titled “Query Parameters ”Unix timestamp (seconds) for the start of the window.
Example
1760054400Unix timestamp (seconds), exclusive bound; must be greater than start.
Example
1760659200Granularity: DAILY (default).
Example
DAILYIANA timezone used for send-day delivery bucketing (default “UTC”).
Example
UTCOptional WABA filter (internal UUID or Meta WABA ID).
Optional CSV or JSON array of up to 100 template UUIDs or Meta template IDs.
Optional CSV or JSON array of up to 100 exact template names.
Optional CSV or JSON array of up to 100 base template names (Conductor client-facing names or plain template names).
Grouping mode: “template” (default) or “base_template” (rolls up Conductor group variants).
Example
templateProduct type filter for click analytics: “ALL” (default), “CLOUD_API”, or “MARKETING_MESSAGES_LITE_API”.
Example
ALLOptional CSV or JSON array of metric types: SENT, DELIVERED, READ, FAILED, CLICKED.
Example
SENT,DELIVERED,READ,FAILED,CLICKEDCase-insensitive substring search on template_name or base_template_name.
Sort field: sent_count (default), delivered_count, read_count, failed_count, clicked_total, unique_clicked_total, click_rate, name.
Example
sent_countSort order: desc (default) or asc.
Example
descPage number (1-indexed, default 1).
Example
1Page size (default 50, clamped to 1..=100).
Example
50false (default) returns only templates with activity in the range; true returns every template.
Example
falseResponses
Section titled “ Responses ”Template analytics response
object
object
“event_day_utc” — clicked_total, unique_clicked_total, url_button_clicks, unique_url_button_clicks, quick_reply_button_clicks, unique_quick_reply_button_clicks, and clicked_breakdown are bucketed by the UTC calendar day (00:00–24:00 UTC) the click occurred.
“meta” (template_analytics_daily), “inbound_taps” (template_inbound_button_taps_daily), or “none”
“send_day” — sent_count, delivered_count, read_count, and failed_count count each
message’s current status on the calendar day (in tz) the message was sent/created.
“rows” (mahadata.messages_v3_by_client_day via traffic_rows) or “scylla_v3_counters”
Human-readable explanation of why a day bucket can show clicks/reads with 0 sends.
object
object
object
Example generated
{ "attribution": { "clicks_attribution": "example", "clicks_source": "example", "delivery_attribution": "example", "delivery_source": "example", "note": "example" }, "data": [ { "base_template_name": "example", "category": "example", "click_rate": 1, "clicked_breakdown": [ { "button_content": "example", "count": 1, "type": "example" } ], "clicked_total": 1, "clicks_attribution": "example", "clicks_source": "example", "delivered_count": 1, "delivery_attribution": "example", "delivery_rate": 1, "delivery_source": "example", "failed_count": 1, "language": "example", "meta_template_id": "example", "product_types": [ "example" ], "quick_reply_button_clicks": 1, "read_count": 1, "read_rate": 1, "sent_count": 1, "status": "example", "template_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "template_name": "example", "unique_click_rate": 1, "unique_clicked_total": 1, "unique_quick_reply_button_clicks": 1, "unique_url_button_clicks": 1, "url_button_clicks": 1, "variant_count": 1, "waba_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } ], "end": 1, "granularity": "example", "group_by": "example", "pagination": { "limit": 1, "page": 1, "total_items": 1, "total_pages": 1 }, "product_type": "example", "ready_days": 1, "start": 1, "status": "example", "template_analytics_enabled": true, "total_days": 1, "tz": "example"}Invalid query parameters
Standard error response format.
object
object
Example generated
{ "error": { "code": 1, "message": "example", "type": "example" }}Unauthorized - Invalid API Key
Standard error response format.
object
object
Example generated
{ "error": { "code": 1, "message": "example", "type": "example" }}Forbidden - WABA or template not owned by this API key
Standard error response format.
object
object
Example generated
{ "error": { "code": 1, "message": "example", "type": "example" }}Too many concurrent requests for this account
Standard error response format.
object
object
Example generated
{ "error": { "code": 1, "message": "example", "type": "example" }}Service busy
Standard error response format.
object
object
Example generated
{ "error": { "code": 1, "message": "example", "type": "example" }}