Skip to Content

Get WhatsApp template stats

Get WhatsApp template stats. Request: GET /v1/whatsapp/templates/stats. Scope: whatsapp:read.

GET
/v1/whatsapp/templates/stats

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.

Authorization

apiKey
headerx-api-key<token>

Query Parameters

startDate?string
endDate?string
templateId?string
Match^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$
campaignId?string
Match^camp_[0-9a-hjkmnp-tv-z]{16,24}$
journeyId?string
Match^jrny_[0-9a-hjkmnp-tv-z]{16,24}$

Response Body

WhatsAppTemplateStats

application/json
  1. response
items*array<>
Example Request
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"
        }
      ]
    }
  ]
}

Related documentation