Skip to content

Retrieve DMARC reporting data for a hostname.

Request

Security
basicAuth
Path
domainstringrequired

Fully qualified domain name

Example:example.com
sourcestringrequired

User friendly source id name

Example:mailgun
hoststringrequired

Host name

Example:mx.mailgun.com
Query
frominteger

UNIX epoch (UTC seconds) representing the start of the time range.

Example:from=1736790000
tointeger

UNIX epoch (UTC seconds) representing the end of the time range. If supplied, from must also be set.

Example:to=1736790285
curl -i -X GET \
  -u '<username>:<password>' \
  'https://api.mailgun.net/v1/dmarc/domains/example.com/s/mailgun/h/mx.mailgun.com?from=1736790000&to=1736790285'

Responses

OK | Object representing DMARC info for a hostname

Bodyapplication/json
Response
{ "email_count": "79,", "ip_count": 2, "spf_fail_events": 1, "dkim_fail_events": 1, "auth_fail_events": 1, "pfqr_chart": [ { … }, { … } ], "ip_addresses": [ { … }, { … } ], "auth_events": [ { … } ] }