GET /api/analytics/channels Returns notification metrics broken down by channel type, including time series data for each channel.

Headers

appid
string
required
Your CometChat App ID.
apikey
string
required
Your CometChat API Key.

Query parameters

from
string
required
Start date in ISO 8601 format.
to
string
required
End date in ISO 8601 format.
granularity
string
default:"daily"
Time series granularity: hourly or daily.

Example request

curl "https://{appId}.api-{region}.cometchat.io/v3/business-messaging/api/analytics/channels?from=2024-01-01T00:00:00Z&to=2024-01-31T23:59:59Z&granularity=daily" \
  -H "appid: YOUR_APP_ID" \
  -H "apikey: YOUR_API_KEY"

Example response

[
  {
    "channelType": "in_app",
    "delivered": 10000,
    "viewed": 6000,
    "clicked": 2500,
    "timeSeries": [
      {
        "date": "2024-01-01",
        "delivered": 350,
        "viewed": 200,
        "clicked": 80
      }
    ]
  },
  {
    "channelType": "push",
    "delivered": 5000,
    "viewed": 2500,
    "clicked": 700,
    "timeSeries": [
      {
        "date": "2024-01-01",
        "delivered": 150,
        "viewed": 80,
        "clicked": 20
      }
    ]
  }
]

Response fields

channelType
string
Channel type: in_app, push, sms, email, whatsapp, or custom.
delivered
integer
Total delivered count for this channel.
viewed
integer
Total viewed count for this channel.
clicked
integer
Total clicked count for this channel.
timeSeries
object[]
Array of time-bucketed data points with date, delivered, viewed, and clicked.