Skip to Content

Get WhatsApp messaging stats

Returns aggregate WhatsApp delivery, read, and failure statistics for the organization.

GET
/v1/whatsapp/stats

Returns aggregate WhatsApp delivery, read, and failure statistics for the organization.

Authorization

apiKey
headerx-api-key<token>

Query Parameters

startDate?string
endDate?string

Response Body

Success

application/json
  1. response
totalSent*integer
Range0 <= value <= 9007199254740991
totalDelivered*integer
Range0 <= value <= 9007199254740991
totalRead*integer
Range0 <= value <= 9007199254740991
totalFailed*integer
Range0 <= value <= 9007199254740991
deliveryRate*number
readRate*number
failureRate*number
Example Request
import { createClient } from "samva";

const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });

const result = await samva.whatsapp.getStats({});
Example Response
{
  "totalSent": 0,
  "totalDelivered": 0,
  "totalRead": 0,
  "totalFailed": 0,
  "deliveryRate": 0,
  "readRate": 0,
  "failureRate": 0
}

Related documentation