# Get DMARC Report

GET /api/v2/projects/{projectId}/domains/by-name/{domainName}/dmarc-report

Summarises the DMARC aggregate reports mailbox providers sent for a sending domain: how many messages claimed to be from it, how many passed SPF, DKIM and DMARC for that domain, and the 50 largest senders by volume. A sender with dmarcPass of 0 is not authorised to send as the domain. Reports only arrive once the domain's DMARC record names Saasco's reporting address in rua, and a provider sends one a day, so a new domain has none for the first day or two. Dates are ISO timestamps; the default range is the last 30 days.

## Request

- projectId: string, path, required — ID of the project that owns the domain.
- domainName: string, path, required — Hostname to look up, without a protocol, e.g. mail.example.com.
- dateFrom: string, query — Only count reports that start on or after this ISO timestamp. Defaults to 30 days before dateTo.
- dateTo: string, query — Only count reports that start before this ISO timestamp. Defaults to now.

## Response

- 200: Successful response
  - lastReportAt: string, required
  - reporters: string[], required
  - sources: object[], required
    - dkimAligned: number, required
    - dkimDomains: string[], required
    - dmarcPass: number, required
    - ips: number, required
    - messages: number, required
    - source: string, required
    - spfAligned: number, required
    - spfDomains: string[], required
  - totals: object, required
    - dkimAligned: number, required
    - dmarcPass: number, required
    - messages: number, required
    - spfAligned: number, required
    - unauthorisedSources: number, required
- 400: Invalid input data
- 401: Authorization not provided
- 403: Insufficient access
- 404: Not found
- 500: Internal server error
