Zernio
Zernio
API Reference

Inbox Analytics

List conversation analyticsGETGet conversation analyticsGETGet day × hour heatmapGETGet inbox response-time statsGETGet inbox source breakdownGETGet top accounts by inbox volumeGETGet inbox messaging volumeGET
Dashboard
llms.txtOpenAPI
OverviewPlatformsAPI ReferenceResources
Inbox Analytics

Get inbox messaging volume

Daily inbox messaging volume + breakdowns. Folds the raw messaging events into three projections so the client can render the volume chart, KPI strip, and per-platform stacked bar from a single call. Max date range is 365 days.


GET
/v1/analytics/inbox/volume

Authorization

bearerAuth
AuthorizationBearer <token>

API key authentication - use your Zernio API key as a Bearer token

In: header

Query Parameters

fromDate*string

Inclusive lower bound (YYYY-MM-DD). Required.

Formatdate
toDate?string

Inclusive upper bound (YYYY-MM-DD). Defaults to today.

Formatdate
profileId?string
platform?string

Filter by single platform (facebook, instagram, twitter, etc.).

accountId?string
source?string

Filter by metadata.source lineage (human, workflow, sequence, broadcast, comment_automation, api, contact, platform).

Response Body

application/json

application/json

application/json

application/json

{  "success": true,  "from": "2019-08-24",  "to": "2019-08-24",  "summary": {    "received": 0,    "sent": 0,    "read": 0,    "failed": 0,    "uniqueConversations": 0  },  "timeseries": [    {      "date": "2019-08-24",      "sent": 0,      "received": 0,      "read": 0,      "failed": 0    }  ],  "byPlatform": [    {      "platform": "string",      "sent": 0,      "received": 0,      "read": 0,      "failed": 0    }  ]}
Was this page helpful?

Get top accounts by inbox volume

Leaderboard of social accounts by inbox message volume. Decorates each row with display labels from the live SocialAccount record (so the UI shows username + displayName, not just an ID). Accounts that no longer map to a SocialAccount surface as "(disconnected)" so the row stays visible. Max date range is 365 days.

Get campaign tree

Returns a nested Campaign > Ad Set > Ad hierarchy with rolled-up metrics at each level. Uses a two-stage aggregation: ads are grouped into ad sets, then ad sets into campaigns. Metrics are computed over an optional date range, then rolled up from ad level to ad set and campaign levels. Pagination is at the campaign level. Ads without a campaign or ad set ID are grouped into synthetic "Ungrouped" buckets. If no date range is provided, defaults to the last 90 days. Date range is capped at 730 days max. Pass `timeIncrement=1` to also get a daily breakdown: each node gains a `daily[]` array of per-day metrics (same fields as the aggregated `metrics`) in the same call. Use `dailyLevel` (`campaign` default, or `adset` / `ad`) to choose which levels carry the series. This replaces calling the tree once per day for per-campaign daily trends. **Deleted objects stay in the tree.** Deleting an ad or a campaign is a soft delete: the Ad documents move to `status: cancelled` and are kept indefinitely, so their historical spend still counts toward the metrics of any date range they fall in. There is no pruning job and no retention window. Filter on `status` if your view should hide them, but do that after reading the totals, not before.