Get WhatsApp template stats
Get WhatsApp template stats. Request: GET /v1/whatsapp/templates/stats. Scope: whatsapp:read.
GET
Returns sent, delivered, read, and failed counts and Meta's estimated cost for each WhatsApp template, split by what sent it: a campaign, a journey step, or a direct send. Filter by template, campaign, journey, or the time the message was created.
apiKeyheader
x-api-key<token>startDate?stringendDate?stringtemplateId?stringMatch
^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$campaignId?stringMatch
^camp_[0-9a-hjkmnp-tv-z]{16,24}$journeyId?stringMatch
^jrny_[0-9a-hjkmnp-tv-z]{16,24}$WhatsAppTemplateStats
application/json- response
items*array<>import { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.whatsapp.getTemplateStats({});Example Response
{
"items": [
{
"templateId": "string",
"templateSlug": "string",
"name": "string",
"language": "string",
"category": "marketing",
"source": {
"type": "campaign",
"campaignId": "string"
},
"sent": 0,
"delivered": 0,
"read": 0,
"failed": 0,
"estimatedProviderCosts": [
{
"amount": "string",
"currency": "string"
}
]
}
]
}