campaign/stats_by_id
Tool: read
Retrieve time-series statistics for a campaign.
Returns a timeline array (ISO-8601 dates) plus parallel series arrays (sentSeries, opensSeries, clicksSeries, replySeries, unspamSeries) and a per-followup followupStats array (which can come back empty — see below). Date range defaults to campaign creation date → today. Use refresh=true to force recalculation (slower).
This operation returns a daily time-series, not headline totals. For aggregate counts —
sentCount,bounceCount,openCount, etc. — read the campaign object itself: campaign/get or campaign/get_by_id; the arrays here (sentSeries,opensSeries, …) are for trend/timeline rendering, not summary numbers. Bounced contacts are enumerated via thesendingStatusfilter on prospect/get — not via messages. Drill-downs: who replied = message/get withtype=Reply+campaignId— that set is all inbound mail (auto-responders and delivery-failure notices included), so narrow it withconfirmedStatusbefore reporting it as replies; who opened = pagetype=Sentmessages and read eachopenCount(there is no server-side open/bounce filter; opens are otherwise aggregate-only in these stats); per followup step = the same operation withfollowupId, or the counters on each followup (schemas/followup) —followupStatshere can come back empty even for a campaign whose followups have sent. There is no per-subject-variant breakdown anywhere in this response. Opens and clicks are counters: no device, email-client, geolocation, or user-agent data exists anywhere in the platform — not here, not in the web app.
Arguments
| name | type | req | notes |
|---|---|---|---|
| id | integer | ✓ | Campaign ID — the object's campaignId |
| dateStart | string | – | date-time; ISO 8601 (defaults to campaign creation date) |
| dateEnd | string | – | date-time; ISO 8601 (defaults to today) |
| refresh | boolean | – | Force stats recalculation (default false) |
Response
200 — Stats object. Deltas:
| field | type | description |
|---|---|---|
| campaignId | integer | Campaign ID |
| timeline | array | Date-time labels (x-axis) |
| sentSeries | object | {count[], openCount[]} aligned to timeline |
| sentInitialSeries | object | Initial-email-only sent series |
| opensSeries | object | Opens series |
| clicksSeries | object | Clicks series |
| replySeries | object | Replies series |
| unspamSeries | object | Unspam series |
| followupStats | array | Per-followup: {followupId, subject, displayName, sentSeries} |
Errors: 400, 401, 404, 406, 422, 429, 500 — shared schema: schemas/errors.
Sent count not moving on a
Runningcampaign? Sending is paced, so give it a few minutes first; past that, why-isnt-it-sending works through the causes in order.
Invoke
Call read with name: "campaign/stats_by_id".