DMARC builder
Build a DMARC record step by step, with a rollout plan from monitoring to reject and the records report services need.
POST /v1/build/dmarc
- Price
- Free; any API key works and nothing is charged.
- Cache
- Never cached; every call runs again.
- MCP tool
- build_dns_record
Request body
| Name | Type | Description |
|---|---|---|
| domain | string or null | Your domain; names the record and checks report addresses. |
| policy (required) | "none" | "quarantine" | "reject" | What receivers do with mail that fails DMARC. |
| subdomain_policy | "none" | "quarantine" | "reject" or null | A different policy for subdomains; leave empty to use the main policy. |
| pct | integer | Percentage of failing mail the policy applies to. |
| rua | array of string or null | Addresses for daily aggregate reports, one per line. |
| ruf | array of string or null | Addresses for failure reports, one per line. |
| adkim | "r" | "s" | DKIM alignment, relaxed or strict. |
| aspf | "r" | "s" | SPF alignment, relaxed or strict. |
| fo | "0" | "1" | "d" | "s" or null | When failure reports are sent. |
Response
| Name | Type | Description |
|---|---|---|
| tool (required) | string | |
| target (required) | string | |
| status (required) | "ok" | "partial" | "error" | |
| fetched_at | string | |
| cached | boolean | |
| credits_used | integer | Credits this call took from your balance. 0 for free tools, for a replay of an earlier call, and for a free check run on the website without signing in |
| summary (required) | string | |
| score | integer or null | |
| findings | array of object | |
| credits_remaining (required) | integer | Your balance after this call. It can be below zero after a refund; free tools still work then |
| data (required) | object | This tool's result |
| data.kind (required) | "spf" | "dmarc" | "caa" | |
| data.name (required) | string | |
| data.type (required) | "TXT" | "CAA" | |
| data.value (required) | string | |
| data.strings (required) | array of string | |
| data.length (required) | integer | |
| data.zone_line (required) | string | |
| data.mode (required) | "build" | "validate" | |
| data.spf | object or null | |
| data.dmarc | object or null | |
| data.caa | object or null |
Errors
- 400 Invalid domain, URL or parameter, a TLD this tool can't check, or an X-Request-Id already used for another call (`invalid_domain`, `invalid_url`, `invalid_request`, `unsupported_tld`)
- 401 Missing, unknown or revoked API key, or one whose creator is no longer a member of the account (`unauthorized`)
- 403 Account suspended, the key's creator is over the plan's seats, or an anonymous check without a valid proof-of-work or for a tool that needs an account, or bulk checks before a first purchase (`account_suspended`, `plan_limit`, `challenge_required`, `sign_in_required`, `bulk_locked`)
- 429 Too many requests, today's free checks are used up, or too many website scans at once; wait for the number of seconds in the Retry-After header (`rate_limited`, `free_limit_reached`, `too_many_jobs`). Not charged
- 500 Unexpected error (`internal_error`)
Example
curl
curl -X POST "https://api.dnssuper.com/v1/build/dmarc" \
-H "Authorization: Bearer $DNSSUPER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"domain":"example.com"}'Python
import os
import httpx
client = httpx.Client(
base_url="https://api.dnssuper.com",
headers={"Authorization": f"Bearer {os.environ['DNSSUPER_API_KEY']}"},
timeout=60,
)
response = client.post("/v1/build/dmarc", json={
"domain": "example.com",
})
response.raise_for_status()
result = response.json()
print(result["summary"], result["credits_used"])TypeScript
const response = await fetch("https://api.dnssuper.com/v1/build/dmarc", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.DNSSUPER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"domain":"example.com"}),
});
if (!response.ok) throw new Error((await response.json()).error.message);
const result = await response.json();
console.log(result.summary, result.credits_used);Example response
{
"tool": "dmarc-generator",
"target": "",
"status": "ok",
"fetched_at": "2026-11-14T10:00:00Z",
"cached": false,
"credits_used": 0,
"summary": "Your DMARC record is ready: publish it as a TXT record at _dmarc.example.com. The report domains it names must publish the authorization records listed.",
"findings": [
{
"id": "dmarc_builder.external_reports",
"severity": "info",
"title": "Reports go to another domain",
"detail": "reports.example.net",
"fix": "That domain must publish an authorization record; the result lists it."
}
],
"data": {
"kind": "dmarc",
"name": "_dmarc.example.com",
"type": "TXT",
"value": "v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com,mailto:agg@reports.example.net",
"strings": [
"v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com,mailto:agg@reports.example.net"
],
"length": 83,
"zone_line": "_dmarc.example.com. 3600 IN TXT \"v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com,mailto:agg@reports.example.net\"",
"mode": "build",
"dmarc": {
"rollout": [
{
"stage": 1,
"policy": "none",
"value": "v=DMARC1; p=none; rua=mailto:dmarc@example.com,mailto:agg@reports.example.net",
"when": "Now: collect reports for two to four weeks and fix any sender that fails."
},
{
"stage": 2,
"policy": "quarantine",
"value": "v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com,mailto:agg@reports.example.net",
"when": "When reports show all your own mail passes."
},
{
"stage": 3,
"policy": "reject",
"value": "v=DMARC1; p=reject; rua=mailto:dmarc@example.com,mailto:agg@reports.example.net",
"when": "After a few weeks on quarantine without surprises."
}
],
"report_authorizations": [
{
"domain": "reports.example.net",
"name": "example.com._report._dmarc.reports.example.net",
"value": "v=DMARC1"
}
]
}
},
"credits_remaining": 498
}MCP
{
"tool": "build_dns_record",
"arguments": {
"domain": "example.com"
}
}Your DMARC record is ready: publish it as a TXT record at _dmarc.example.com. The report domains it names must publish the authorization records listed.
Name: _dmarc.example.com (TXT)
Value: v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com,mailto:agg@reports.example.net
Zone line: _dmarc.example.com. 3600 IN TXT "v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com,mailto:agg@reports.example.net"
Authorization needed: example.com._report._dmarc.reports.example.net TXT "v=DMARC1"
- info: Reports go to another domain
Free | checked 2026-11-14 10:00 UTC