Analytics
Get channel performance analytics
Returns aggregate delivery metrics plus unique-message email Open and Click rates over the selected date range.
GET
Returns aggregate delivery metrics plus unique-message email Open and Click rates over the selected date range. sent counts every outbound message accepted in the range; each rate is taken over the messages the channel actually attempted, so one still waiting to be sent neither helps nor hurts it. Each engagement rate uses the corresponding tracking-eligible delivered-message cohort; repeated provider observations do not inflate the numerator.
apiKeyheader
x-api-key<token>after?stringbefore?stringSuccess
application/json- response
email*whatsapp*sms*import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.analytics.getChannelStats({});Example Response
{ "email": { "sent": 0, "deliveryRate": 0, "uniqueOpenedMessages": 0, "openTrackingEligibleDeliveredMessages": 0, "uniqueMessageOpenRate": 0, "uniqueClickedMessages": 0, "clickTrackingEligibleDeliveredMessages": 0, "uniqueMessageClickRate": 0, "bounceRate": 0 }, "whatsapp": { "sent": 0, "deliveryRate": 0, "readRate": 0, "failureRate": 0, "avgResponseTime": 0 }, "sms": { "sent": 0, "deliveryRate": 0, "failureRate": 0, "totalSegments": 0 }}