Campaign dashboard metrics

Get aggregated email/SMS campaign performance stats and audience contact counts for the authenticated user's company over a given date range, optionally scoped to one store.

Auth: Account — authentication (inside the authenticated api. group; route lives under the campaign/dashboard account group). Scope is implicit: the controller filters RsCampaign, so a caller only ever sees their own company's campaigns. An optional store_id is further validated by an ownership check.

Rate limit: No rate limit.

Request

  • Query: start_date (string Y-m-d, required) — start of the metrics window; parsed with startOfDay.
  • Query: end_date (string Y-m-d, required) — end of the window; must be after_or_equal:start_date; parsed with endOfDay.
  • Query: store_id (integer, optional / nullable) — scope metrics to a single store; must belong to the auth user's company hierarchy (an ownership check).

Response{ data. } envelope. (Note: the controller returns successResponse(['status' => 'success', 'data' => [.]]), so the success payload is nested as data.data.)

  • status (string) — literal "success".
  • data.email_performance.sent (int) — non-test emails with sent_at in range.
  • data.email_performance.delivered (int) — emails with delivered_at in range.
  • data.email_performance.opened (int) — emails with opened_at in range.
  • data.email_performance.clicked (int) — emails with clicked_at in range.
  • data.email_performance.unsubscribed (int) — emails with unsubscribed_at in range.
  • data.email_performance.rates.delivered (float) — delivered / sent * 100, rounded 2dp (0 when sent=0).
  • data.email_performance.rates.opened (float) — opened / sent * 100.
  • data.email_performance.rates.clicked (float) — clicked / sent * 100.
  • data.email_performance.rates.unsubscribed (float) — unsubscribed / sent * 100.
  • data.email_performance.rates.sent (float) — sent / currentEmailValidContacts * 100 (denominator = audience rows in range with is_email_valid = valid).
  • data.sms_performance.sent (int) — non-test SMS with sent_at in range.
  • data.sms_performance.delivered (int) — SMS with delivered_at in range.
  • data.sms_performance.link_clicked (int) — SMS with link_clicked_at in range.
  • data.sms_performance.failed (int) — SMS where status = failed OR failed_at set, with the failure/send/creation timestamp in range.
  • data.sms_performance.rates.delivered (float) — delivered / sent * 100.
  • data.sms_performance.rates.link_clicked (float) — link_clicked / sent * 100.
  • data.sms_performance.rates.failed (float) — failed / sent * 100.
  • data.sms_performance.rates.sent (float) — sent / currentSmsValidContacts * 100 (denominator = audience rows in range with is_phone_valid = valid).
  • data.audience.current_contacts (int) — valid, non-test CampaignAudienceData rows created within the window.
  • data.audience.previous_contacts (int) — same count over the immediately preceding window of equal length.
  • data.audience.change_percent (float) — (current - previous) / previous * 100, rounded 2dp (0 when previous=0).

Errors: 422 on validation failure.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string
required

Required — first day of the reporting window (YYYY-MM-DD).

string
required

Required — last day of the reporting window (YYYY-MM-DD).

Response

Language
Credentials
Bearer
JWT
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json