DMARC metric aggregation
The aggregation endpoint turns your DMARC reports into numbers you can chart, compare, and act on. You choose what to count, how to break it down, how to spread it over time, and what to leave out. The dmarced dashboard uses this same endpoint for its email traffic tables, graphs, and summary emails.
For tokens and the full specification, see Programmable access to email monitoring.
Request
Send a GET request with your team ID (it can be found in your team's settings) and a query query parameter as URL-encoded JSON.
https://api.dmarced.eu/v1/teams/{teamId}/dmarc/aggregate?query={query}The following example query asks: “For November, how many emails did each sending provider send, and how many were DMARC compliant? Show me each half of the month separately.”
{
"start": "2026-11-01T00:00:00Z",
"end": "2026-12-01T00:00:00Z",
"metrics": ["reportedEmailCount", "dmarcCompliantEmailCount"],
"groups": [
{ "attributes": ["sourceLabel"], "limit": 2 }
],
"periods": 2,
"filters": {
"domainName": "example.com"
}
}A query has five parts. Four are required.
| Field | Required | What it does |
|---|---|---|
start | Yes | Start of the reporting time range as ISO 8601 timestamp. |
end | Yes | End of the reporting time range as ISO 8601 timestamp. |
metrics | Yes | One or more metrics to calculate. |
groups | Yes | How to break the numbers down. Use [] for totals only. |
periods | Yes | How many equal time slices to split the range into, or null for none. |
filters | No | Attribute values that emails must match to be counted. |
Metrics
A metric is a number we calculate for the whole range, for every group, and for every period. Most metrics count emails. A DMARC report doesn’t list emails one by one. It says “this many emails from this sending IP got these results”, and we add those up. Counts are allocated to periods (see Periods and allocation below) and rounded to whole emails.
Email volume
| Metric | Description |
|---|---|
reportedEmailCount | All emails the reports cover. |
acceptedEmailCount | Emails the receiving provider accepted. Accepted doesn’t guarantee final inbox placement, see Service limitations. |
quarantinedEmailCount | Emails the receiving provider quarantined. |
rejectedEmailCount | Emails the receiving provider rejected. |
Authentication
| Metric | Description |
|---|---|
dmarcCompliantEmailCount | Emails where SPF or DKIM passed and aligned with the header from domain. |
spfAlignedEmailCount | Emails where SPF passed and aligned. |
dkimAlignedEmailCount | Emails where DKIM passed and aligned. |
ptrConfirmedEmailCount | Emails from sending IPs with a confirmed PTR record, also called forward-confirmed reverse DNS (FCrDNS). |
Distinct counts
| Metric | Description |
|---|---|
dmarcReportCount | The number of (overlapping) reports the numbers come from. |
dmarcRecordCount | The authentication results behind the numbers. Each one covers one DMARC report record. |
sourceAddressCount | Number of sending IPs. |
sourceLabelCount | Number of sending providers. |
Distinct counts aren’t scaled by allocation factors. A report is either part of a period or it isn’t, so a report that overlaps two periods counts once in each. The same goes for groups: a sending IP that shows up in two groups counts once in each. Every period and group shows the right number, but the totals above them add those numbers up, so they can be higher than the number of distinct reports, authentication results, or sending IPs in the whole range. Email counts don’t have this problem, because the allocation factors split them. For an exact distinct count of the whole range, don’t use periods, and read it at the deepest group level, or at the top if you don’t use groups.
Attributes
An attribute describes where an email came from or what happened to it. You can use an attribute in groups to break numbers down by it, and in filters to keep only matching emails. The attributes fall into a few families.
Domains
| Attribute | Description |
|---|---|
domainName | The DMARC domain, where the DMARC record is published. |
headerFromDomainName | The domain in the header from address. It can be a subdomain of the DMARC domain. |
Sending IP and sending provider
| Attribute | Description |
|---|---|
sourceAddress | The sending IP. |
sourceLabel | The name of the sending provider. It is the organizational domain of the sending IP’s confirmed PTR record, such as example.com. Without a confirmed PTR record, it is the IP address itself. |
sourceCountryCode | The two-letter country code of the sending IP. Can be null. |
sourceAsn | The autonomous system number of the network that hosts the sending IP, such as AS12345. Can be null. |
sourceAsName | The name of that network. Can be null. |
Start overviews with sourceLabel. Big senders use many IP addresses, so sourceAddress quickly gives you hundreds of groups.
Authentication and outcome
| Attribute | Description |
|---|---|
spfAligned | true when SPF passed and the envelope from domain aligned with the header from domain. |
dkimAligned | true when a DKIM signature passed and its signing domain aligned with the header from domain. |
dmarcCompliant | true when spfAligned or dkimAligned is true. |
disposition | What the receiving provider did: none, pass, quarantine, or reject. Both none and pass mean it accepted the email. |
emailTrafficGuidance | The recommended next step for the traffic. See the values below. |
Group by emailTrafficGuidance when you want to know what to do next, not only what happened.
Traffic guidance values
These are the values of emailTrafficGuidance, with the labels you see in the app. What each category means and what to do about it is explained in Email traffic guidance categories.
| Value | Label |
|---|---|
noAction | Fully verified |
improveTrust | Improve trust |
investigateForwarding | Investigate forwarding |
authenticateSending | Verify sources |
investigateFiltering | Investigate filtering |
investigateRejection | Investigate rejection |
Reports
| Attribute | Description |
|---|---|
dmarcReportId | The ID of the report. |
dmarcReportGeneratorName | The name of the receiving provider that sent the report. |
dmarcReportGeneratorFromEmail | The address the report was sent from. |
dmarcReportStartAt and dmarcReportEndAt | The time span the report covers. |
dmarcReportSource | How we got the report: mailbox, mailboxDmarcFail, or mailboxDuplicate. |
dmarcReportFileSize | The size of the report file in bytes. |
dmarcReportRecordIndex | The position of the authentication results within the report. |
Groups
Groups break metric numbers down. Without groups, you get one set of totals. With groups, you also get a list of groups, and every group has its own totals.
Each entry in groups is one level, and an entry can hold more than one attribute:
[{ "attributes": ["sourceLabel"] }]gives one group per sending provider.[{ "attributes": ["headerFromDomainName", "sourceLabel"] }]gives one group per combination, such as each sending provider for each header from domain. The result is one flat list.
Nested groups
To nest groups, add more entries. Each entry sits inside the one before it, like folders inside folders. This query first splits traffic by recommended action, then splits each of those by sending provider:
{
"start": "2026-11-01T00:00:00Z",
"end": "2026-12-01T00:00:00Z",
"metrics": ["reportedEmailCount"],
"groups": [
{ "attributes": ["emailTrafficGuidance"] },
{ "attributes": ["sourceLabel"], "limit": 5 }
],
"periods": null
}The answer has this shape:
totals
├── noAction totals
│ ├── mailer.example.net totals
│ ├── news.example.org totals
│ └── other totals
└── investigateForwarding totals
└── mailer.example.net totalsYou get totals at every level, so you don’t have to add anything up yourself. You don’t repeat the parent’s attribute in the next level. A group at a deeper level carries its parent’s values too, so the same sending provider under two different guidance values shows up as two groups.
Limits and the “other” group
By default, every level returns up to 100 groups per parent. Set limit between 1 and 100 to get fewer. We keep the groups we see first, which are usually the largest, and fold the rest into a single group with "attributes": null. Its metrics add up everything that was folded.
Each level also has groupCount. It counts every group at that level, including the folded ones, so you can say “and 12 more”.
Periods and allocation
Periods split your time range into equal slices, so you can draw a trend. "periods": 2 over a 30-day range gives two periods of 15 days. Each slice is a window with a start and an end, and periodDateRanges lists them. Every metric appears in every period, with 0 when nothing was reported.
A DMARC report covers a span of time, usually 24 hours, and doesn’t say when inside that span each email arrived. That means we can’t tell which period a single email belongs to. So we allocate. For every report and every window, we calculate an allocation factor by dividing the time the report overlaps the window by the time the report covers.
We multiply the counts of the report’s authentication results by that factor. For each group and period, we add the results up and round to whole emails.
Here’s an example. A report covers November 15 at 12:00 to November 16 at 12:00 and contains 1,000 emails. You ask for two periods that meet at November 16 at 00:00. The first window overlaps half of the report, and so does the second. Both get a factor of 0.5, so each period receives 500 emails.
If a report lies fully inside your range, its factors add up to 1, so no emails get lost or counted twice. At the edges of your range, a report that starts before start or ends after end only counts for the part inside it. The same goes for "periods": null, where the whole range is one window.
As such, allocated numbers are not raw data. Rounding happens for each group and period, so adding up raw records yourself can differ by a few emails.
For daily numbers, use a range of whole days and set periods to the number of days. A 30-day range with "periods": 30 gives you one value per day. A report that spans two days is split between them by the factors above.
Filters
Filters decide which emails are counted at all. Each filter is an attribute with one value, and an email has to match every filter to count.
{
"filters": {
"domainName": "example.com",
"disposition": "reject"
}
}This counts only emails rejected for the DMARC domain example.com.
- A filter takes one value.
- Use real JSON booleans for
spfAligned,dkimAligned, anddmarcCompliant:true. - Filtering by an attribute doesn’t add it to the answer. To see it, group by it as well.
- By default, we only count reports with
dmarcReportSourceset tomailbox. Set the filter yourself to look at another source.
Response
The query from the start of this page returns this. The values are examples.
{
"data": {
"metrics": {
"reportedEmailCount": 12840,
"dmarcCompliantEmailCount": 12300
},
"groupCount": 4,
"groups": [
{
"attributes": {
"sourceLabel": "mailer.example.net"
},
"metrics": {
"reportedEmailCount": 9000,
"dmarcCompliantEmailCount": 8900
},
"periods": [
{
"reportedEmailCount": 5000,
"dmarcCompliantEmailCount": 4950
},
{
"reportedEmailCount": 4000,
"dmarcCompliantEmailCount": 3950
}
]
},
{
"attributes": {
"sourceLabel": "news.example.org"
},
"metrics": {
"reportedEmailCount": 2500,
"dmarcCompliantEmailCount": 2400
},
"periods": [
{
"reportedEmailCount": 1200,
"dmarcCompliantEmailCount": 1150
},
{
"reportedEmailCount": 1300,
"dmarcCompliantEmailCount": 1250
}
]
},
{
"attributes": null,
"metrics": {
"reportedEmailCount": 1340,
"dmarcCompliantEmailCount": 1000
},
"periods": [
{
"reportedEmailCount": 800,
"dmarcCompliantEmailCount": 600
},
{
"reportedEmailCount": 540,
"dmarcCompliantEmailCount": 400
}
]
}
],
"periods": [
{
"reportedEmailCount": 7000,
"dmarcCompliantEmailCount": 6700
},
{
"reportedEmailCount": 5840,
"dmarcCompliantEmailCount": 5600
}
],
"periodDateRanges": [
{
"start": "2026-11-01T00:00:00.000Z",
"end": "2026-11-16T00:00:00.000Z"
},
{
"start": "2026-11-16T00:00:00.000Z",
"end": "2026-12-01T00:00:00.000Z"
}
]
},
"meta": {
}
}| JSON field | Description |
|---|---|
data.metrics | The totals for the whole range and all groups. |
data.groupCount | How many groups exist at this level, including folded ones. Here it is 4, but only 3 entries are listed because 2 sending providers were folded into one. |
data.groups | The groups, each with attributes, metrics, and, if you nested more levels, its own groupCount and groups. |
attributes | The values that identify a group. It is null for the folded group. |
periods | One set of metrics for each period, in the same order as periodDateRanges. Every group has its own. |
data.periodDateRanges | The start and end of every period. Only present at the top. |
meta.legal | Attribution text, set when the query uses the sending IP, country, or network attributes. Show it next to that data. |
Example queries
How much of my mail is DMARC compliant, day by day?
{
"start": "2026-11-01T00:00:00Z",
"end": "2026-12-01T00:00:00Z",
"metrics": ["reportedEmailCount", "dmarcCompliantEmailCount"],
"groups": [],
"periods": 30
}Which sending providers fail DMARC?
{
"start": "2026-11-01T00:00:00Z",
"end": "2026-12-01T00:00:00Z",
"metrics": ["reportedEmailCount"],
"groups": [
{ "attributes": ["sourceLabel"], "limit": 10 }
],
"periods": null,
"filters": {
"dmarcCompliant": false
}
}Who got rejected, and by which receiving provider?
{
"start": "2026-11-01T00:00:00Z",
"end": "2026-12-01T00:00:00Z",
"metrics": ["rejectedEmailCount"],
"groups": [
{ "attributes": ["dmarcReportGeneratorName"] },
{ "attributes": ["sourceLabel"], "limit": 5 }
],
"periods": null,
"filters": {
"disposition": "reject"
}
}Limitations
This endpoint is built for dashboards and reports. It isn’t the right tool for every job.
Aggregated data isn’t raw data
Allocation factors turn the numbers into interpreted values, not copies of what a report says. When you need the data as the receiving provider sent it, use these endpoints instead:
- List DMARC reports
- Retrieve a DMARC report by ID
- Retrieve a DMARC report file
- List authentication results for a DMARC report
- Retrieve a single DMARC authentication result
DMARC data isn’t live data
Data becomes visible once we have finished processing it. That includes looking up details about the sending IP, such as its PTR record. Receiving providers can also send reports up to three days late. So the most recent days are incomplete and can still change. Treat the numbers as a view of the past, not as a live feed.
Aggregation isn't meant for polling
You may use this endpoint on a schedule, such as a daily summary. Checking more often than once a day doesn't reveal more data. Receiving providers usually send their reports once a day, and we add them in batches, so more frequent queries mostly return the same numbers. We may add rate limits to this endpoint in the future.