Menu

Compare campaigns

GET/v1/reports/campaigns

Requires an API key with the reports:read scope. About keys and scopes

One row per campaign with a marketing email sent, or a marketing push queued, in the window. Counts are send cohorts like the overview: email by the time it was sent, push by the time it was queued, and later feedback revises them. Conversions are those whose source message was sent in the window, and revenue is summed per goal currency, never converted. Rates are fractions; null means no denominator, and sorts below every rate. firstSentAt is the earliest send in the window, not the campaign schedule; sent sorts by email sent.

Query parameters

limitintegeroptional

min > 0 · max 100 · default 20

cursorstringoptional

1–2048 characters

startDatestringoptional

First day, inclusive, in the workspace timezone. Give with endDate.

date

endDatestringoptional

Last day, inclusive, no later than today. Give with startDate; a window is at most 366 days. Omit both for the last 30 days.

date

sortstringoptional

A field ascending, or -field descending. Rates with no denominator sort last.

one of firstSentAt, sent, openRate, clickRate, bounceRate, unsubscribeRate, conversions, -firstSentAt, -sent, -openRate, -clickRate, -bounceRate, -unsubscribeRate, -conversions · default "-firstSentAt"

Returns

Returns 200 OK with a list of CampaignPerformance objects in data, and the next page's cursor in meta (see pagination). Otherwise returns an error; Errors lists every code and which to retry.

campaignIdstringrequired

uuid

namestringrequired
statusstringrequired

one of draft, scheduled, sending, sent, cancelled

channelsstring[]required

The channels the campaign targets.

firstSentAtstringrequired

The earliest send in the window, not the campaign schedule.

date-time

emailobjectrequired

Email counts for the window.

7 child attributes
sentintegerrequired

min 0 · max 9007199254740991

deliveredintegerrequired

min 0 · max 9007199254740991

openedintegerrequired

min 0 · max 9007199254740991

clickedintegerrequired

min 0 · max 9007199254740991

bouncedintegerrequired

min 0 · max 9007199254740991

complainedintegerrequired

min 0 · max 9007199254740991

unsubscribedintegerrequired

min 0 · max 9007199254740991

ratesobjectrequired

Email rates as fractions; null when there is no denominator.

6 child attributes
deliverynumber | nullrequired

min 0

opennumber | nullrequired

min 0

clicknumber | nullrequired

min 0

bouncenumber | nullrequired

min 0

complaintnumber | nullrequired

min 0

unsubscribenumber | nullrequired

min 0

pushobjectrequired

Push counts for the window.

4 child attributes
sentintegerrequired

min 0 · max 9007199254740991

failedintegerrequired

min 0 · max 9007199254740991

openedintegerrequired

min 0 · max 9007199254740991

clickedintegerrequired

min 0 · max 9007199254740991

conversionsintegerrequired

Goal conversions whose source message was sent in the window.

min 0 · max 9007199254740991

revenueobject[]required

Revenue per goal currency.

2 child attributes
currencystring | nullrequired

The goal currency; null when it has none.

valuenumberrequired

Revenue in that currency, never converted.