Analytics

Get channel performance analytics

Returns aggregate delivery metrics plus unique-message email Open and Click rates over the selected date range.

GET
/v1/analytics/channel-stats

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.

Authorization

apiKey
headerx-api-key<token>

Query Parameters

after?string
before?string

Response Body

Success

application/json
  1. response
email*
whatsapp*
sms*
Example Request
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  }}

Related documentation