# Summarize DMARC results by domain

`GET https://api.mailmasker.org/api/v1/dmarc/summary`

For each domain, how many messages passed DMARC and how many failed.

- Who can use it: Site admins
- Area: DMARC reports
- Answers 200 OK when it works
- Page: https://developer.mailmasker.org/dmarc-summary

One row per domain, the most failing mail first. Every count is of messages: `aligned` passed DMARC, `failing` did not, and `acted_on` were quarantined or rejected by the receiver. `policy_p` is the policy receivers found published, `reporters` how many receivers sent reports, and `sources` how many sending addresses they saw.

## Parameters

| Name | In | Required | What it is | Example |
|---|---|---|---|---|
| `days` | query | no | How many days back to look, by when each report's period began. 30 if you leave it out, 3650 at most. |  |

## Examples

cURL:

```bash
curl -s 'https://api.mailmasker.org/api/v1/dmarc/summary' \
  -H "Authorization: Bearer $TOKEN"
```

Perl:

```perl
use Mojo::Base -strict;
use Mojo::UserAgent;

my $ua  = Mojo::UserAgent->new;
my $res = $ua->get('https://api.mailmasker.org/api/v1/dmarc/summary',
    { Authorization => "Bearer $ENV{TOKEN}" })->result;
die $res->code, ' ', ($res->json('/error') // $res->message), "\n" unless $res->is_success;
print $res->body, "\n";
```

homelab-cli:

There is no homelab-cli command for this yet.

## Response

200 OK:

```json
{
  "days": 30,
  "domains": [
    {
      "domain": "example.com",
      "policy_p": "quarantine",
      "reports": 58,
      "reporters": 4,
      "sources": 6,
      "messages": 1290,
      "aligned": 1281,
      "failing": 9,
      "acted_on": 9,
      "window_start": "2026-10-04 19:00:00-05",
      "window_end": "2026-11-03 17:59:59-06"
    }
  ]
}
```
