# Get Email Stats by Provider

GET /api/v2/projects/{projectId}/email-campaigns/{campaignId}/provider-stats

The campaign's sent, delivered, bounced, complained, opened, and clicked recipients split by mailbox provider (Gmail, Google Workspace, Outlook, Microsoft 365, iCloud, Yahoo/AOL, Proton, Zoho, other, unknown), read from each recipient domain's mail host, plus the same counts for the 20 recipient domains with the most sends. Opens and clicks that look automated (Apple Mail Privacy, Microsoft Safe Links, security scanners) are also counted in machineOpened and machineClicked, so clicked minus machineClicked is clicks by people.

## Request

- projectId: string, path, required — ID of the project that owns the campaign.
- campaignId: string, path, required — ID of the campaign to report on.
- dateFrom: string, query — Only count events on or after this `YYYY-MM-DD` date. Omit for the campaign's whole lifetime.
- dateTo: string, query — Only count events on or before this `YYYY-MM-DD` date.
- messageId: string, query — Only count sends of this message (an A/B version). Omit for every message.
- sendPhase: sample | rollout, query — Only count A/B sample sends (`sample`) or the winner rollout (`rollout`). Omit for both.

## Response

- 200: Successful response
  - domains: object[], required — The recipient domains with the most sends, most sent first. At most 20.
    - bounced: integer, required — Recipients whose email bounced.
    - clicked: integer, required — Recipients who clicked at least once.
    - complained: integer, required — Recipients who marked the email as spam.
    - delivered: integer, required — Recipients the email was delivered to.
    - domain: string, required — Recipient email domain, lowercased.
    - machineClicked: integer, required — Clickers whose every click looks automated (Safe Links or a scanner). Subtract from clicked for clicks by people.
    - machineOpened: integer, required — Openers whose every open looks automated (Apple Mail Privacy or a scanner).
    - opened: integer, required — Recipients who opened at least once.
    - provider: gmail | google_workspace | outlook | microsoft_365 | icloud | yahoo_aol | proton | zoho | other | unknown, required — Mailbox provider from the MX records of the email domain: gmail, google_workspace, outlook (consumer Outlook/Hotmail), microsoft_365, icloud, yahoo_aol, proton, zoho, other, or unknown (no address, no MX, or the lookup failed).
    - sent: integer, required — Recipients the email was sent to.
  - providers: object[], required — One row per mailbox provider, most sent first.
    - bounced: integer, required — Recipients whose email bounced.
    - clicked: integer, required — Recipients who clicked at least once.
    - complained: integer, required — Recipients who marked the email as spam.
    - delivered: integer, req
…
