Retrieve a campaign's metrics over time
GET/v1/campaigns/{id}/series
Requires an API key with the campaigns:read scope. About keys and scopes
Works with integration, agent and partner keys.
Returns how a campaign's metrics built up over time: for each hour or day, how many messages were sent, delivered, opened, clicked, bounced and so on, with email and push counted apart. Use it to chart a send, for example to see that most opens came in the first six hours.
Each point counts what happened in that hour or day: an open at 10:05 counts in the 10:00 hour, whenever the email was sent. Opens and clicks count the first per message, as in the campaign's metrics. Because a point counts events, not the people sent to in that hour, don't divide one point by another to get an open rate; divide running totals.
The series starts at the campaign's first send and runs, with no gaps, to now, in the workspace's timezone (timezone). With interval=hour it covers at most 72 hours; with interval=day, at most 366 days. from and to narrow it (from inclusive, to exclusive, from before to); a date means the start of that day in the workspace's timezone. A campaign that has not sent yet, or a window ending before its first send, returns no points.
Path parameters
idstringrequiredThe campaign's id.
uuid
Query parameters
intervalstringrequiredThe bucket size.
one of
hour,dayfromstringoptionalInclusive: start the series at the bucket holding this time instead of the first send. A date-time, or a date meaning the start of that day in the workspace timezone.
tostringoptionalExclusive: end the series with the bucket holding the moment before this time instead of now, in the same forms. A date ends the series with the day before it.
Header parameters
Kirora-WorkspacestringoptionalPartner keys only: the child workspace to act in, by the external id the partner gave it. Without it, a partner key acts in its own workspace. Any other key that sends it is refused with 403, and an unknown workspace is 404.
pattern
^[A-Za-z0-9._:-]{1,128}$
Returns
Returns 200 OK with a CampaignSeries in data. Otherwise returns an error; Errors lists every code and which to retry.
campaignIdstringrequireduuid
intervalstringrequiredThe bucket size.
one of
hour,daytimezonestringrequiredThe workspace's timezone, which every hour and day follows.
pointsobject[]requiredOne point per hour or day, from the first send to now, with no gaps.
at most 366 items
3 child attributes
startsAtstringrequiredWhen this hour or day starts in
timezone, given as an instant.date-time
emailobjectoptionalEmail events in this hour or day; absent when the campaign sends no email.
7 child attributes
sentintegerrequiredmin 0
deliveredintegerrequiredmin 0
openedintegerrequiredmin 0
clickedintegerrequiredmin 0
bouncedintegerrequiredmin 0
complainedintegerrequiredmin 0
unsubscribedintegerrequiredmin 0
pushobjectoptionalPush events in this hour or day; absent when the campaign sends no push.
4 child attributes
sentintegerrequiredmin 0
failedintegerrequiredmin 0
openedintegerrequiredmin 0
clickedintegerrequiredmin 0