Getting started

Add a domain, publish the TXT record Mailfact shows you, mint a token, and call the API. The reference is on the next page.

API reference. MCP uses the same token.

1. Point rua at Mailfact

Create an account, then add the domain. Mailfact shows a TXT record. It looks like this. Use the value on the domain page. If you already publish DMARC, append the rua address instead of replacing p=.

_dmarc.example.com TXT "v=DMARC1; p=none; rua=mailto:…@reports.mailfact.app"

Receivers send aggregate reports to that address. The first report often takes a day or two. An empty list until then is normal.

2. Mint a token

In the product, open API tokens and create one. The raw token is shown once. It starts with dmr_. Send it as Authorization: Token.

3. First curl

curl -sS https://api.mailfact.app/api/v1/domains/ \
  -H "Authorization: Token dmr_…"

Before any report has arrived, the list of domains is there and the report list is empty:

{"next": null, "previous": null, "results": []}

When a day of mail has been reported, a row looks like this. Country on an IP is from IPinfo (CC-BY-SA 4.0).

curl -sS "https://api.mailfact.app/api/v1/reports/records/?page_size=1" \
  -H "Authorization: Token dmr_…"
{
  "header_from": "example.com",
  "source_ip": "203.0.113.10",
  "source_ip_country": "US",
  "disposition": "none",
  "dkim_aligned": true,
  "spf_aligned": false,
  "count": 42
}