Skip to main content
SaaS|Security Engineer / TPRM / MSP

Single-Call Email Security Posture Review

Collect a combined email authentication and transport-policy snapshot

Collect a combined email authentication and transport-policy snapshot. Use the API workflow below to collect dated findings, review their scope, and decide which follow-up checks your team needs.

Implementation example by the EdgeDNS team · Updated

The Challenge

Separate authentication and transport checks can produce fragmented evidence with different failure conditions.

The Solution

Use email-posture to collect SPF, DKIM, DMARC, BIMI, MTA-STS, and DANE analyzer results in one response. Review ranked recommendations and component availability before sharing the findings. The DNSSEC aggregate describes underlying lookup evidence, not complete cryptographic validation of every domain record.

Endpoints Used

Combine these EdgeDNS endpoints to build this solution.

GET
/v1/security/email-postureAPI reference

Email Posture (Composite): Single-call composite that fans out across SPF, DKIM, DMARC, and DMARCbis tree-walk

GET
/v1/security/spfAPI reference

SPF Check: Validate SPF record syntax, DNS lookups, and policy

GET
/v1/security/dkimAPI reference

DKIM Check: Discover and validate DKIM signing keys

GET
/v1/security/dmarcAPI reference

DMARC Check: Analyze DMARC policy, alignment, and reporting

What this workflow helps you do

Collect six analyzer results

Review component details alongside the composite score.

Prioritize recommendations

Use severity and endpoint references to plan follow-up checks.

Inspect degraded responses

Treat failed or unavailable components as incomplete evidence.

Code Example

Collect a combined email authentication and transport-policy snapshot

javascript
const headers = { Authorization: 'Bearer YOUR_API_KEY' };
const checks = [
  {
    "path": "/v1/security/email-posture",
    "params": {
      "domain": "cloudflare.com"
    }
  },
  {
    "path": "/v1/security/spf",
    "params": {
      "domain": "google.com"
    }
  },
  {
    "path": "/v1/security/dkim",
    "params": {
      "domain": "google.com"
    }
  }
];

// Run sequentially to keep concurrency bounded. API tier restrictions apply.
for (const { path, params } of checks) {
  const url = new URL(path, 'https://api.edgedns.dev');
  url.search = new URLSearchParams(params).toString();
  const response = await fetch(url, { headers });
  const result = await response.json();
  if (!response.ok) {
    throw new Error(`${path}: ${response.status} ${result.error?.message ?? 'Request failed'}`);
  }
  // Keep the response metadata and any partial/unknown findings for review.
  console.log(path, result);
}

Learn More

Explore industry standards and best practices related to this use case.

Ready to build Single-Call Email Security Posture Review?

Get started with 200 free API requests per month. No credit card required.

Other Use Cases

Email security posture review — single API call | EdgeDNS