API Documentation
Programmatic access to DMARC.WS for domain management, DNS lookups, and report retrieval.
API key access requires an Enterprise or MSP plan
Base URL
https://api.dmarc.ws/v1Authentication
JWT Token (User sessions)
Authorization: Bearer eyJhbGciOi...API Key (Programmatic access)
X-API-Key: dmws_k1_abc123...Create API keys in Dashboard → API Keys. Keys belong to your user and work in each of your organizations on an Enterprise or MSP plan. They cannot reach admin routes or change account security.
Rate Limits
Free
100 req/hr
Enhanced
1,000 req/hr
Enterprise
10,000 req/hr
Endpoints
/auth/signupRegister a new user account
/auth/loginLog in and receive a JWT
/auth/meGet current user profile
/dmarc/checkLook up DMARC DNS record
/spf/checkLook up SPF DNS record
/dkim/checkLook up DKIM DNS record
/bimi/checkLook up BIMI DNS record
/mta-sts/checkCheck MTA-STS DNS + policy
/orgs/:orgId/domainsList organization domains
/orgs/:orgId/domainsAdd a domain
/orgs/:orgId/domains/:idUpdate domain settings
/orgs/:orgId/domains/:idRemove a domain
/orgs/:orgId/domains/:id/validateValidate domain DNS
/orgs/:orgId/domains/:id/statsGet domain report stats
/orgs/:orgId/domains/:id/reportsList DMARC reports
/orgs/:orgId/domains/:id/healthGet DNS health + score
/orgs/:orgId/domains/:id/policy-historyGet DMARC policy change history
/orgs/:orgId/domains/:id/geoGet geographic sender distributionEnhanced+
/orgs/:orgId/domains/:id/failure-reportsList RUF failure reportsEnhanced+
/orgs/:orgId/domains/:id/tls-reportsList TLS reportsEnhanced+
/orgs/:orgId/domains/:id/export-pdfDownload PDF reportEnhanced+
/orgs/:orgId/domains/:id/export-csvDownload CSV exportEnhanced+
/orgs/:orgId/domains/:id/servicesDetect sending servicesEnhanced+
/orgs/:orgId/domains/:id/ai-insightsGet cached AI analysis
/orgs/:orgId/domains/:id/ai-insightsGenerate AI analysis (SSE stream)
/orgs/:orgId/domains/:id/sender-authList sender authorizationsEnhanced+
/orgs/:orgId/domains/:id/sender-authUpsert sender authorizationEnhanced+
/orgs/:orgId/audit-logGet audit log entriesEnterprise
/orgs/:orgId/webhooksList webhooksEnhanced+
/orgs/:orgId/webhooksCreate webhookEnhanced+
/v1/healthAPI health check
Response Format
Success
{
"data": {
"domains": [...]
},
"requestId": "clx9a2b..."
}Error
{
"error": "Domain limit reached",
"requestId": "clx9a2b..."
}HTTP Status Codes
Success
Request completed successfully.
Validation Error
Request body or query parameters failed Zod validation.
Unauthorized
Missing, expired, or invalid JWT / API key.
Plan Upgrade Required
Feature requires a higher plan (Enhanced+ or Enterprise).
Not Found
Resource does not exist or is not accessible to your account.
Rate Limited
Too many requests. Retry after the time in the Retry-After header.
Pagination
All list endpoints support pagination via query parameters. Results are returned in reverse-chronological order by default.
pagePage number, starting at 1 (default).
limitItems per page, max 100. Default 50.
GET /v1/orgs/:orgId/domains?page=2&limit=25
// Response includes a pagination object:
{
"data": {
"domains": [...],
"pagination": {
"page": 2,
"limit": 25,
"total": 73,
"pages": 3
}
}
}Request / Response Examples
Expand each endpoint to see a complete curl example and sample JSON response.
POST /dmarc/checkLook up a DMARC DNS record (no auth required)
POST /dmarc/checkLook up a DMARC DNS record (no auth required)
Request
curl -X POST https://api.dmarc.ws/v1/dmarc/check \
-H "Content-Type: application/json" \
-d '{
"domain": "example.com"
}'
Response
{
"data": {
"domain": "example.com",
"found": true,
"record": "v=DMARC1; p=reject; rua=mailto:dmarc@example.com; pct=100",
"parsed": {
"v": "DMARC1",
"p": "reject",
"rua": "mailto:dmarc@example.com",
"pct": "100"
}
},
"requestId": "clx9a2b3c0001..."
}
GET /orgs/:orgId/domainsList all domains in your organization
GET /orgs/:orgId/domainsList all domains in your organization
Request
curl https://api.dmarc.ws/v1/orgs/org_abc123/domains \
-H "X-API-Key: dmws_k1_your_key_here"
Response
{
"data": {
"domains": [
{
"id": "dom_1a2b3c",
"domain": "example.com",
"validated": true,
"createdAt": "2025-06-01T12:00:00.000Z",
"lastReportAt": "2025-06-15T08:30:00.000Z"
},
{
"id": "dom_4d5e6f",
"domain": "mail.example.org",
"validated": false,
"createdAt": "2025-06-10T09:00:00.000Z",
"lastReportAt": null
}
],
"pagination": {
"page": 1,
"limit": 50,
"total": 2,
"pages": 1
}
},
"requestId": "clx9b4d5e0002..."
}
GET /orgs/:orgId/domains/:id/statsRetrieve aggregated report statistics for a domain
GET /orgs/:orgId/domains/:id/statsRetrieve aggregated report statistics for a domain
Request
curl https://api.dmarc.ws/v1/orgs/org_abc123/domains/dom_1a2b3c/stats \
-H "X-API-Key: dmws_k1_your_key_here"
Response
{
"data": {
"totalReports": 142,
"totalMessages": 58340,
"passRate": 97.2,
"dkimAlignRate": 98.1,
"spfAlignRate": 96.8,
"failedMessages": 1632,
"periodStart": "2025-05-01T00:00:00.000Z",
"periodEnd": "2025-06-15T23:59:59.000Z"
},
"requestId": "clx9c6f7g0003..."
}
GET /orgs/:orgId/domains/:id/healthGet DNS health score and detailed check results
GET /orgs/:orgId/domains/:id/healthGet DNS health score and detailed check results
Request
curl https://api.dmarc.ws/v1/orgs/org_abc123/domains/dom_1a2b3c/health \
-H "X-API-Key: dmws_k1_your_key_here"
Response
{
"data": {
"score": 85,
"grade": "B+",
"results": {
"dmarc": {
"status": "pass",
"record": "v=DMARC1; p=reject; rua=mailto:dmarc@example.com",
"policy": "reject"
},
"spf": {
"status": "pass",
"record": "v=spf1 include:_spf.google.com ~all",
"lookups": 4
},
"dkim": {
"status": "pass",
"selectors": ["google", "s1"],
"validKeys": 2
},
"bimi": {
"status": "missing",
"record": null
},
"mtaSts": {
"status": "pass",
"mode": "enforce"
}
},
"checkedAt": "2025-06-15T12:00:00.000Z"
},
"requestId": "clx9d8h9i0004..."
}
PUT /orgs/:orgId/domains/:id/sender-authUpsert a sender authorization for a domain (Enhanced+)
PUT /orgs/:orgId/domains/:id/sender-authUpsert a sender authorization for a domain (Enhanced+)
Request
curl -X PUT https://api.dmarc.ws/v1/orgs/org_abc123/domains/dom_1a2b3c/sender-auth \
-H "Content-Type: application/json" \
-H "X-API-Key: dmws_k1_your_key_here" \
-d '{
"sourceIp": "198.51.100.25",
"service": "Mailchimp",
"status": "authorized",
"note": "Marketing email campaigns"
}'
Response
{
"data": {
"id": "sa_7g8h9i",
"domainId": "dom_1a2b3c",
"sourceIp": "198.51.100.25",
"service": "Mailchimp",
"status": "authorized",
"note": "Marketing email campaigns",
"createdAt": "2025-06-15T14:00:00.000Z",
"updatedAt": "2025-06-15T14:00:00.000Z"
},
"requestId": "clx9e0j1k0005..."
}
Quick Example
# Check a DMARC record (no auth required)
curl -X POST https://api.dmarc.ws/v1/dmarc/check \
-H "Content-Type: application/json" \
-d '{"domain": "google.com"}'
# List your domains (API key required)
curl https://api.dmarc.ws/v1/orgs/YOUR_ORG_ID/domains \
-H "X-API-Key: dmws_k1_your_key_here"