DMARC API
DMARC API
Retrieve DMARC aggregate report data for your domains. Monitor who sends email as your domain and track DKIM/SPF alignment rates.
DMARC data is only available after you configure the _dmarc DNS record with your Postscale report address. See the DMARC Reports guide for setup instructions.
Get Summary
GET /v1/domains/:id/dmarc/summary
Returns aggregated DMARC statistics for a domain over a configurable number of days.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
days | integer | Number of days to aggregate (default: 30) |
Example Request
curl -X GET "https://api.postscale.io/v1/domains/d290f1ee-6c54-4b01-90e6-d701748f0851/dmarc/summary?days=30" \
-H "Authorization: Bearer ps_live_your_api_key"
Response
{
"total_messages": 48250,
"pass_dkim": 47100,
"pass_spf": 46800,
"aligned": 46500,
"dkim_rate": 0.9762,
"spf_rate": 0.9700,
"alignment_rate": 0.9637,
"report_count": 42
}
Get Source IPs
GET /v1/domains/:id/dmarc/sources
Returns a breakdown of sending IP addresses with DKIM/SPF authentication results.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
days | integer | Number of days to aggregate (default: 30) |
limit | integer | Maximum number of IPs to return (default: 20) |
Example Request
curl -X GET "https://api.postscale.io/v1/domains/d290f1ee-6c54-4b01-90e6-d701748f0851/dmarc/sources?days=30&limit=10" \
-H "Authorization: Bearer ps_live_your_api_key"
Response
{
"sources": [
{
"source_ip": "198.51.100.25",
"total": 35000,
"pass_dkim": 34800,
"pass_spf": 34650,
"dkim_rate": 0.9943,
"spf_rate": 0.9900
},
{
"source_ip": "203.0.113.10",
"total": 8200,
"pass_dkim": 8100,
"pass_spf": 8050,
"dkim_rate": 0.9878,
"spf_rate": 0.9817
}
]
}
Get Daily Alignment
GET /v1/domains/:id/dmarc/daily
Returns time-series data of daily email volumes and alignment rates.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
days | integer | Number of days to retrieve (default: 30) |
Example Request
curl -X GET "https://api.postscale.io/v1/domains/d290f1ee-6c54-4b01-90e6-d701748f0851/dmarc/daily?days=7" \
-H "Authorization: Bearer ps_live_your_api_key"
Response
{
"daily": [
{
"date": "2026-02-14",
"total": 1580,
"aligned": 1540,
"alignment_rate": 0.9747
},
{
"date": "2026-02-13",
"total": 1620,
"aligned": 1595,
"alignment_rate": 0.9846
}
]
}
List Reports
GET /v1/domains/:id/dmarc/reports
Returns a paginated list of aggregate reports received for the domain.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer | Number of reports per page (default: 20) |
offset | integer | Number of reports to skip (default: 0) |
Example Request
curl -X GET "https://api.postscale.io/v1/domains/d290f1ee-6c54-4b01-90e6-d701748f0851/dmarc/reports?limit=10" \
-H "Authorization: Bearer ps_live_your_api_key"
Response
{
"reports": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"reporter_org": "google.com",
"reporter_email": "noreply-dmarc-support@google.com",
"report_id": "17078234567890123456",
"date_begin": "2026-02-13T00:00:00Z",
"date_end": "2026-02-14T00:00:00Z",
"policy_domain": "yourapp.com",
"policy_adkim": "r",
"policy_aspf": "r",
"policy_p": "quarantine",
"total_count": 1580,
"pass_dkim_count": 1560,
"pass_spf_count": 1540,
"aligned_count": 1540,
"created_at": "2026-02-14T06:15:00Z"
}
],
"total": 42
}
Get Report Detail
GET /v1/domains/:id/dmarc/reports/:reportId
Returns a single aggregate report with all individual record rows.
Example Request
curl -X GET "https://api.postscale.io/v1/domains/d290f1ee-6c54-4b01-90e6-d701748f0851/dmarc/reports/a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
-H "Authorization: Bearer ps_live_your_api_key"
Response
{
"report": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"reporter_org": "google.com",
"report_id": "17078234567890123456",
"date_begin": "2026-02-13T00:00:00Z",
"date_end": "2026-02-14T00:00:00Z",
"total_count": 1580,
"pass_dkim_count": 1560,
"pass_spf_count": 1540,
"aligned_count": 1540
},
"records": [
{
"source_ip": "198.51.100.25",
"count": 1520,
"disposition": "none",
"dkim_result": "pass",
"spf_result": "pass",
"header_from": "yourapp.com",
"envelope_from": "yourapp.com"
},
{
"source_ip": "203.0.113.10",
"count": 40,
"disposition": "none",
"dkim_result": "fail",
"spf_result": "pass",
"header_from": "yourapp.com",
"envelope_from": "yourapp.com"
}
]
}
Get DMARC Address
GET /v1/domains/:id/dmarc/address
Returns the domain's DMARC report address. If no address exists yet, one is automatically created.
Example Request
curl -X GET "https://api.postscale.io/v1/domains/d290f1ee-6c54-4b01-90e6-d701748f0851/dmarc/address" \
-H "Authorization: Bearer ps_live_your_api_key"
Response
{
"address": "abc123def@dmarc.postscale.io",
"rua": "mailto:abc123def@dmarc.postscale.io",
"created_at": "2026-02-14T10:30:00Z"
}
Fields Reference
Summary Fields
| Field | Type | Description |
|---|---|---|
total_messages | integer | Total messages reported |
pass_dkim | integer | Messages passing DKIM |
pass_spf | integer | Messages passing SPF |
aligned | integer | Messages passing both DKIM and SPF alignment |
dkim_rate | float | DKIM pass rate (0.0 to 1.0) |
spf_rate | float | SPF pass rate (0.0 to 1.0) |
alignment_rate | float | Full alignment rate (0.0 to 1.0) |
report_count | integer | Number of aggregate reports received |
Report Record Fields
| Field | Type | Description |
|---|---|---|
source_ip | string | IP address of the sending server |
count | integer | Number of messages from this IP |
disposition | string | Policy applied: none, quarantine, or reject |
dkim_result | string | DKIM evaluation: pass or fail |
spf_result | string | SPF evaluation: pass or fail |
header_from | string | Domain in the From: header |
envelope_from | string | Domain in the Return-Path |