API documentation

The DMARC Owl API gives scripts and other tools the same data as the dashboard: your domains, DMARC analysis, reports and alerts. It is a JSON REST API over HTTPS and it is free, like the rest of DMARC Owl.

Getting started

  1. Sign in and open Settings.
  2. Under API tokens, give the token a name, choose its access and how long it lasts, and create it.
  3. Copy the token. It starts with dmo_ and is shown only once.
  4. Call the API with the token in the Authorization header:
export DMARCOWL_TOKEN="dmo_…"
curl https://api.dmarcowl.com/v1/domains \
  -H "Authorization: Bearer $DMARCOWL_TOKEN"

The base URL for every endpoint is https://api.dmarcowl.com.

Authentication

Every request, except the public tools, needs a token sent as a bearer token:

Authorization: Bearer dmo_…

Access

  • Read only tokens can make GET requests: list domains, read analysis, reports and alerts. Listing webhooks is the one exception, because webhook URLs are secrets.
  • Read and write tokens can also add and delete domains, re-check DNS, set sender verdicts, import reports, mark alerts as seen and manage webhooks.

Give each tool its own token with the least access it needs, so you can revoke one without affecting the others.

Expiry

A token can expire after 1 hour, 1 day, 7, 30 or 90 days, 1 year, or never. Short-lived tokens suit one-off scripts and CI jobs. An expired token stops working at once; create a new one to continue.

What tokens cannot do

Creating, listing and revoking tokens, signing out and deleting the account can only be done in the dashboard. A token cannot create more tokens.

Keeping tokens safe

  • Treat a token like a password. Store it in a secret manager or environment variable, never in source code.
  • Tokens are meant for servers and scripts. The API does not accept them from web pages on other sites (CORS).
  • Settings shows when each token was last used. If a token may have leaked, revoke it there; it stops working immediately.
  • We store only a hash of each token, so we cannot show it to you again.

Requests and responses

Send request bodies as JSON with Content-Type: application/json, except report imports, which take a file. Unknown fields in a request body are rejected, so typos do not pass silently. Every response is a JSON envelope. A successful response has ok: true and the result in data:

{ "ok": true, "data": { … } }

A failed response has ok: false and an error with a stable code and a readable message:

{ "ok": false, "error": { "code": "insufficient_scope", "message": "This API token is read-only." } }

Times are RFC 3339 in UTC. Rates such as pass_rate are fractions from 0 to 1. Examples on this page show only the data part; … marks fields left out for brevity. New fields may be added to responses at any time, so ignore fields you do not recognise.

Errors

StatusCodeMeaning
400bad_requestA parameter is malformed (such as days=abc), or the body is not valid JSON or has unknown fields.
401invalid_tokenThe token is missing, malformed, expired or revoked, or its account is suspended.
403insufficient_scopeA read-only token was used for a request that changes data.
403forbiddenThe action is not available to API tokens (see below).
404not_foundThe resource does not exist, or belongs to another account.
413too_largeAn uploaded file is larger than 10 MB.
415unsupported_media_typeA JSON endpoint was sent a body that is not application/json.
422unprocessableThe request is well formed but invalid, such as a bad domain name. The message says why.
429rate_limitedToo many requests. Wait and retry; the Retry-After header, when present, says how long.
500internalSomething went wrong on our side. Retry later.

Rate limits

  • Each token can make about 120 requests a minute, with short bursts of up to 60.
  • Requests that change data are also limited to about 120 a minute per account, across all tokens and the dashboard.
  • DNS re-checks are limited to a few a minute per account.

Over a limit, the API answers 429 with a Retry-After header. Back off and retry after that many seconds.

Pagination

List endpoints marked paginated take limit (1–200, default 50) and offset. Their response includes meta with the total count:

{ "ok": true, "data": [ … ], "meta": { "total": 812, "limit": 50, "offset": 100 } }

Account

GET /v1/me

The account the token belongs to.

Also returns the token’s own id and scope, which is a handy way to check a token works.

Read token Returns 200 OK

Example
curl "https://api.dmarcowl.com/v1/me" \
  -H "Authorization: Bearer $DMARCOWL_TOKEN"
{
  "account": { "id": 7, "email": "[email protected]", "status": "active", "created_at": "2026-10-02T10:00:00Z", "prefs": { "digest": true, "alerts": true, "muted_alerts": [], "muted_domains": [] } },
  "domain_count": 3,
  "banner": "",
  "token": { "id": 12, "scope": "read" }
}

PATCH /v1/me/prefs

Change email notification preferences.

Read and write token Returns 200 OK

ParameterInTypeDescription
digestbodybooleanSend the weekly digest.
alertsbodybooleanSend alert emails.
muted_alertsbodystring[]Alert kinds to mute everywhere, including webhooks. See Alerts for the kinds.
muted_domainsbodyinteger[]Domain ids whose alerts are muted.
Example
curl -X PATCH "https://api.dmarcowl.com/v1/me/prefs" \
  -H "Authorization: Bearer $DMARCOWL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"digest": false}'
{ "digest": true, "alerts": true, "muted_alerts": ["new_sender"], "muted_domains": [] }

Domains

A domain starts as pending and becomes active once its DMARC record sends reports to its report_address. Reports for a domain are only accepted at its own address.

GET /v1/domains

All your domains with their grade and 30-day totals.

Read token Returns 200 OK

Example
curl "https://api.dmarcowl.com/v1/domains" \
  -H "Authorization: Bearer $DMARCOWL_TOKEN"
[{
    "id": 42,
    "account_id": 7,
    "name": "example.com",
    "token_version": 1,
    "status": "active",
    "created_at": "2026-11-01T09:12:00Z",
    "verified_at": "2026-11-01T09:20:00Z",
    "last_report_at": "2026-11-26T03:05:11Z",
    "last_checked_at": "2026-11-26T06:00:02Z",
    "report_address": "[email protected]",
    "suggested_record": "v=DMARC1; p=none; rua=mailto:[email protected]",
    "tls_rpt_record": "v=TLSRPTv1; rua=mailto:[email protected]",
    "grade": "B",
    "score": 82,
    "policy": "none",
    "messages_30d": 18234,
    "pass_rate_30d": 0.973
  }]

POST /v1/domains

Add one domain, or up to 100 at once.

A single domain is checked immediately; domains added in bulk are checked in the background. Names already on your account are returned in already_added. You can add up to 100 domains a day.

Read and write token Returns 201 Created

ParameterInTypeDescription
namebodystringOne domain name.
namesbodystring[]Several domain names (up to 100). Send name or names.
Example
curl -X POST "https://api.dmarcowl.com/v1/domains" \
  -H "Authorization: Bearer $DMARCOWL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "example.org"}'
{ "created": [ { "id": 43, "name": "example.org", "status": "pending", "report_address": "d1-…@in.dmarcowl.net", "suggested_record": "v=DMARC1; p=none; rua=mailto:d1-…@in.dmarcowl.net", … } ], "already_added": [] }

GET /v1/domains/{id}

One domain, including its latest DNS check in dns.

Read token Returns 200 OK

ParameterInTypeDescription
id*pathintegerDomain id.
Example
curl "https://api.dmarcowl.com/v1/domains/42" \
  -H "Authorization: Bearer $DMARCOWL_TOKEN"

DELETE /v1/domains/{id}

Delete a domain and all of its reports.

This cannot be undone. Remove our address from the domain’s DMARC record afterwards.

Read and write token Returns 200 OK

ParameterInTypeDescription
id*pathintegerDomain id.
Example
curl -X DELETE "https://api.dmarcowl.com/v1/domains/42" \
  -H "Authorization: Bearer $DMARCOWL_TOKEN"
{ "deleted": true }

POST /v1/domains/{id}/check

Re-check the domain’s DNS (DMARC, SPF, DKIM, MX) now.

Returns the domain as in Get a domain. Limited to a few checks a minute per account.

Read and write token Returns 200 OK

ParameterInTypeDescription
id*pathintegerDomain id.
Example
curl -X POST "https://api.dmarcowl.com/v1/domains/42/check" \
  -H "Authorization: Bearer $DMARCOWL_TOKEN"

POST /v1/domains/{id}/rotate

Issue a new report address for the domain.

Reports sent to the previous address are rejected from now on, so update the rua= tag in your DMARC record straight away. Returns the domain with its new report_address and suggested_record.

Read and write token Returns 200 OK

ParameterInTypeDescription
id*pathintegerDomain id.
Example
curl -X POST "https://api.dmarcowl.com/v1/domains/42/rotate" \
  -H "Authorization: Bearer $DMARCOWL_TOKEN"

GET /v1/domains/{id}/dns

The 30 most recent DNS snapshots, newest first.

A snapshot is added when anything in the check changes, and at least once a day. checked_at is when that result was first seen; last_checked_at is the latest check that found the same result. result holds every record found, including MX hosts and each DKIM record.

Read token Returns 200 OK

ParameterInTypeDescription
id*pathintegerDomain id.
Example
curl "https://api.dmarcowl.com/v1/domains/42/dns" \
  -H "Authorization: Bearer $DMARCOWL_TOKEN"
[ { "id": 901, "domain_id": 42, "checked_at": "2026-11-26T06:00:02Z", "last_checked_at": "2026-11-26T09:45:10Z", "grade": "B", "score": 82, "dmarc_record": "v=DMARC1; p=none; …", "spf_record": "v=spf1 include:_spf.google.com ~all", "result": { … } } ]

Analysis

Analysis endpoints summarise the aggregate reports received for a domain over a window of days. Each sender is placed in a bucket: healthy, misconfigured, forwarded, review or suspicious.

GET /v1/domains/{id}/overview

Totals, daily volumes, buckets, enforcement readiness and top fixes.

Read token Returns 200 OK

ParameterInTypeDescription
id*pathintegerDomain id.
daysqueryintegerAnalysis window in days, ending today (UTC). 1–730, default 30.
Example
curl "https://api.dmarcowl.com/v1/domains/42/overview" \
  -H "Authorization: Bearer $DMARCOWL_TOKEN"
{
  "domain": { "id": 42, "name": "example.com", … },
  "from": "2026-10-28", "to": "2026-11-26",
  "waiting": false,
  "messages": 18234, "passed": 17741, "pass_rate": 0.973,
  "daily": [ { "day": "2026-11-25T00:00:00Z", "messages": 640, "passed": 625, "dkim_aligned": 625, "spf_aligned": 610, "quarantined": 0, … } ],
  "buckets": { "healthy": { "senders": 4, "messages": 17500 }, "suspicious": { "senders": 2, "messages": 31 } },
  "readiness": { … }, "journey": { … },
  "top_senders": [ … ], "subdomains": [ … ], "reporters": [ … ], "top_fixes": [ … ]
}

GET /v1/domains/{id}/senders

Every sender seen in the window, with authentication results.

Read token Returns 200 OK

ParameterInTypeDescription
id*pathintegerDomain id.
daysqueryintegerAnalysis window in days, ending today (UTC). 1–730, default 30.
bucketquerystringOnly senders in this bucket: healthy, misconfigured, forwarded, review or suspicious.
Example
curl "https://api.dmarcowl.com/v1/domains/42/senders" \
  -H "Authorization: Bearer $DMARCOWL_TOKEN"
{
  "senders": [ {
    "key": "service:google", "name": "Google Workspace", "bucket": "healthy", "reason": "…",
    "authorised": true, "messages": 15020, "passed": 15002, "pass_rate": 0.999,
    "dkim_aligned": 15002, "spf_aligned": 14890, "forwarded": 0, "quarantined": 0, "rejected": 0,
    "ip_count": 14, "ips": [ … ], "dkim_domains": ["example.com"], "spf_domains": ["example.com"],
    "selectors": ["google"], "header_froms": ["example.com"], "reporters": ["google.com"], "countries": ["US"]
  } ],
  "buckets": { … },
  "readiness": { … }
}

GET /v1/domains/{id}/senders/{key}

One sender, with setup instructions when it is a known service.

Read token Returns 200 OK

ParameterInTypeDescription
id*pathintegerDomain id.
key*pathstringSender key from the senders list, such as service:google or ip:192.0.2.1. URL-encode it (the colon becomes %3A).
daysqueryintegerAnalysis window in days, ending today (UTC). 1–730, default 30.
Example
curl "https://api.dmarcowl.com/v1/domains/42/senders/service%3Agoogle" \
  -H "Authorization: Bearer $DMARCOWL_TOKEN"
{ "sender": { "key": "service:google", … }, "service": { "id": "google", "name": "Google Workspace", "category": "email", "website": "https://workspace.google.com", "fix": { "dkim": "…", "spf": "…" } } }

PUT /v1/domains/{id}/senders/{key}/verdict

Mark a sender as yours or not yours.

Your verdict overrides the automatic bucket for that sender.

Read and write token Returns 200 OK

ParameterInTypeDescription
id*pathintegerDomain id.
key*pathstringSender key from the senders list, such as service:google or ip:192.0.2.1. URL-encode it (the colon becomes %3A).
verdict*bodystringmine, not_mine, or an empty string to clear the verdict.
Example
curl -X PUT "https://api.dmarcowl.com/v1/domains/42/senders/service%3Agoogle/verdict" \
  -H "Authorization: Bearer $DMARCOWL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"verdict": "mine"}'
{ "key": "service:mailchimp", "verdict": "mine" }

GET /v1/domains/{id}/tls

SMTP TLS (TLS-RPT) report summary for the window.

Read token Returns 200 OK

ParameterInTypeDescription
id*pathintegerDomain id.
daysqueryintegerAnalysis window in days, ending today (UTC). 1–730, default 30.
Example
curl "https://api.dmarcowl.com/v1/domains/42/tls" \
  -H "Authorization: Bearer $DMARCOWL_TOKEN"
{ "from": "2026-10-28", "to": "2026-11-26", "summary": { … }, "help": { … } }

Reports

GET /v1/domains/{id}/reports

Reports received for a domain, newest period first. Paginated.

Read token Returns 200 OK

ParameterInTypeDescription
id*pathintegerDomain id.
limitqueryintegerPage size, 1–200. Default 50.
offsetqueryintegerItems to skip. Default 0.
Example
curl "https://api.dmarcowl.com/v1/domains/42/reports" \
  -H "Authorization: Bearer $DMARCOWL_TOKEN"
[ { "id": 5512, "kind": "dmarc", "reporter_org": "google.com", "report_id": "1234567890", "period_start": "2026-11-25T00:00:00Z", "period_end": "2026-11-25T23:59:59Z", "messages": 640, "row_count": 9, "source": "email", "received_at": "2026-11-26T03:05:11Z", "policy": { "p": "none", … } } ]

GET /v1/domains/{id}/reports/{rid}

One report and its rows.

Rows are removed after the retention period; the report summary is kept.

Read token Returns 200 OK

ParameterInTypeDescription
id*pathintegerDomain id.
rid*pathintegerReport id.
Example
curl "https://api.dmarcowl.com/v1/domains/42/reports/5512" \
  -H "Authorization: Bearer $DMARCOWL_TOKEN"
{ "report": { "id": 5512, … }, "rows": [ { "source_ip": "209.85.220.41", "count": 120, "disposition": "none", "header_from": "example.com", "envelope_from": "example.com", "dkim_aligned": true, "spf_aligned": true, "dkim": [ … ], "spf": [ … ], "reasons": [] } ] }

POST /v1/domains/{id}/import

Upload DMARC aggregate reports you already have, to backfill history.

Send the file as multipart/form-data in a field named file, or as the raw request body. XML, .gz and .zip are accepted, up to 10 MB and 50 reports per upload. Reports for other domains and reports already stored are counted and skipped.

Read and write token Returns 200 OK

ParameterInTypeDescription
id*pathintegerDomain id.
file*bodyfileThe report file.
Example
curl -X POST "https://api.dmarcowl.com/v1/domains/42/import" \
  -H "Authorization: Bearer $DMARCOWL_TOKEN" \
  -F "[email protected]"
{ "stored": 12, "duplicate": 3, "wrong_domain": 0 }

Alerts

Alert kinds: new_sender, pass_rate_drop, spoofing_spike, dmarc_changed, dmarc_removed, spf_broken, no_reports and ready_to_enforce. Severity is critical, warning or info.

GET /v1/alerts

Alerts across all your domains, newest first. Paginated.

Read token Returns 200 OK

ParameterInTypeDescription
domain_idqueryintegerOnly alerts for this domain.
unseenquerybooleantrue for alerts not yet marked as seen.
limitqueryintegerPage size, 1–200. Default 50.
offsetqueryintegerItems to skip. Default 0.
Example
curl "https://api.dmarcowl.com/v1/alerts" \
  -H "Authorization: Bearer $DMARCOWL_TOKEN"
[ { "id": 311, "domain_id": 42, "domain_name": "example.com", "kind": "new_sender", "severity": "warning", "title": "New sender: Mailchimp", "detail": { … }, "created_at": "2026-11-26T04:00:00Z" } ]

POST /v1/alerts/seen

Mark alerts as seen.

Read and write token Returns 200 OK

ParameterInTypeDescription
idsbodyinteger[]Alert ids. Leave empty to mark every alert as seen.
Example
curl -X POST "https://api.dmarcowl.com/v1/alerts/seen" \
  -H "Authorization: Bearer $DMARCOWL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ids": [311, 312]}'
{ "updated": 4 }

Webhooks

Webhooks deliver alerts to Slack or to your own HTTPS endpoint. Generic webhook requests carry an X-DMARCOwl-Signature header: sha256= followed by the hex HMAC-SHA256 of the raw request body, keyed with the webhook’s signing secret.

GET /v1/webhooks

Your webhooks. Signing secrets are not included.

Needs a read and write token: webhook URLs (Slack’s especially) let anyone holding them post to your channel.

Read and write token Returns 200 OK

Example
curl "https://api.dmarcowl.com/v1/webhooks" \
  -H "Authorization: Bearer $DMARCOWL_TOKEN"
[ { "id": 3, "account_id": 7, "kind": "slack", "url": "https://hooks.slack.com/services/…", "enabled": true, "created_at": "2026-11-20T12:00:00Z" } ]

POST /v1/webhooks

Add a webhook. The signing secret is returned once.

Read and write token Returns 201 Created

ParameterInTypeDescription
kind*bodystringslack or webhook.
url*bodystringHTTPS URL on a public hostname. Slack URLs must be on hooks.slack.com.
Example
curl -X POST "https://api.dmarcowl.com/v1/webhooks" \
  -H "Authorization: Bearer $DMARCOWL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"kind": "webhook", "url": "https://example.com/hooks/dmarc"}'
{ "webhook": { "id": 4, "kind": "webhook", "url": "https://example.com/hooks/dmarc", "enabled": true, … }, "secret": "3f9c…" }

DELETE /v1/webhooks/{id}

Delete a webhook.

Read and write token Returns 200 OK

ParameterInTypeDescription
id*pathintegerWebhook id.
Example
curl -X DELETE "https://api.dmarcowl.com/v1/webhooks/42" \
  -H "Authorization: Bearer $DMARCOWL_TOKEN"
{ "deleted": true }

POST /v1/webhooks/{id}/test

Send a test alert to a webhook.

Read and write token Returns 202 Accepted

ParameterInTypeDescription
id*pathintegerWebhook id.
Example
curl -X POST "https://api.dmarcowl.com/v1/webhooks/42/test" \
  -H "Authorization: Bearer $DMARCOWL_TOKEN"
{ "queued": true }

Public tools

These endpoints need no token. They are rate limited per IP address.

GET /v1/public/check

Check any domain’s DMARC, SPF, DKIM and MX setup.

No token Returns 200 OK

ParameterInTypeDescription
domain*querystringDomain to check.
selectorsquerystringComma-separated DKIM selectors to try in addition to common ones.
Example
curl "https://api.dmarcowl.com/v1/public/check"

Questions and changes

This is version 1 of the API (the /v1 prefix). We will not remove or rename fields in v1; breaking changes would come with a new version.