Template Analytics
Two endpoints. You must enable template insights once (one-way flag) before the read endpoint returns data. Both are WhatsApp Cloud API analytics-field calls.
1. Enable template insights (one-time)
POST /api/v25.0/{WABA_ID}?is_enabled_for_insights=true
Authorization: Bearer pk_live_<your-key>Customer-scoped alias
POST /api/v1/partner/customers/{customer_id}/whatsapp/analytics/templates/enableOnce on, cannot be turned off — this is a Meta-side rule, not ours.
Response — 200
{ "id": "102290129340398" }cURL
curl -X POST \
"https://api.splashifypro.com/api/v25.0/$WABA_ID?is_enabled_for_insights=true" \
-H "Authorization: Bearer $SPLASHIFY_API_KEY"2. Get template metrics
GET /api/v25.0/{WABA_ID}?fields=template_analytics?start=…&end=…&granularity=DAILY&template_ids=[…]&metric_types=[…]
Authorization: Bearer pk_live_<your-key>Customer-scoped alias
GET /api/v1/partner/customers/{customer_id}/whatsapp/analytics/templates?fields=…Query parameters
Meta’s docs nest the parameters after a literal ? inside the
fields= value (so the URL has a ? twice). Send the params as
the WhatsApp Cloud API specifies — we forward unchanged.
| Field | Required | Notes |
|---|---|---|
start | yes | UNIX timestamp. Times not on a UTC day-boundary are floored to the prior 00:00 UTC |
end | yes | UNIX timestamp. Non-boundary times are rounded up to the next 00:00 UTC |
granularity | yes | DAILY is the only supported value today |
template_ids | yes | Array of template IDs. Max 10 per request |
metric_types | no | SENT / DELIVERED / READ / CLICKED. Omit for all. CLICKED only populates for URL / quick-reply buttons on MARKETING / UTILITY templates |
Response — 200
{
"data": [
{
"granularity": "DAILY",
"data_points": [
{
"template_id": "1924084211297547",
"start": 1689379200,
"end": 1689465600,
"sent": 0,
"delivered": 0,
"read": 0,
"clicked": [
{ "type": "quick_reply_button", "button_content": "Tell me more", "count": 3 },
{ "type": "quick_reply_button", "button_content": "Get coupon", "count": 5 }
]
}
]
}
],
"paging": { "cursors": { "before": "...", "after": "..." } }
}Errors
| Status | Example |
|---|---|
401 | { "success": false, "message": "unauthorized" } |
403 | { "success": false, "message": "id does not belong to your account" } |
404 | { "success": false, "message": "id not found" } |
If insights aren’t enabled, the response returns an empty data array
(not a 4xx). Call the enable endpoint first.
cURL
curl -X GET \
"https://api.splashifypro.com/api/v25.0/$WABA_ID?fields=template_analytics?start=1689379200%26end=1689552000%26granularity=DAILY%26metric_types=[%27SENT%27%2C%27DELIVERED%27%2C%27READ%27%2C%27CLICKED%27]%26template_ids=[1924084211297547%2C954638012257287]" \
-H "Authorization: Bearer $SPLASHIFY_API_KEY"