Skip to main content

DKIM Check API

developer
GET/v1/security/dkim

Discovers and validates DKIM (DomainKeys Identified Mail, RFC 6376) records by probing 30+ common selectors including Google Workspace, Microsoft 365, Amazon SES, SendGrid, Mailchimp, Postmark, Fastmail, Salesforce, Mimecast, Proofpoint, and more. Analyzes key algorithm (RSA/Ed25519 per RFC 8463), key length (RFC 8301 mandates 1024-bit minimum, 2048-bit recommended), detects revoked keys (empty p= tag), and identifies dual-signing setups. Supports custom selector input for targeted verification.

What It Does

Tests 30+ common DKIM selectors (google, default, selector1, selector2, k1, s1, s2, mail, dkim, zoho, fm1, fm2, fm3, mimecast, proofpoint, mandrill, ses, smtpapi, sf1, sf2, hs1, hs2, pm, etc.) by querying <selector>._domainkey.<domain> TXT records. For each discovered key, validates the DKIM record format (v=DKIM1), identifies the key algorithm (k=rsa or k=ed25519 per RFC 8463), estimates key length (RSA key lengths are estimated from base64-encoded public key size; Ed25519 keys are always exactly 256 bits), parses hash algorithms (h= tag), service type (s= tag), and testing flags (t=y), detects revoked keys (empty p= tag indicating key rotation), warns about multiple DKIM records at the same selector, and identifies dual-signing setups. Returns a security score (0-100) with recommendations for key strength, rotation practices, and migration to Ed25519.

Why It's Useful

DKIM provides cryptographic proof that an email hasn't been modified in transit (RFC 6376). It's required for DMARC alignment and directly impacts email deliverability. RSA 1024-bit keys are now considered weak per RFC 8301 — 2048-bit RSA is the industry standard minimum, with Ed25519 (RFC 8463) as the recommended next-generation algorithm. Google, Yahoo, and Microsoft mandate DKIM signing for bulk senders (5,000+ emails/day) as of 2024-2025. Selector discovery also reveals which email services a domain uses — valuable for security assessments and competitive intelligence.

Use Cases

Email Administrator

Email Authentication Setup Verification

After configuring DKIM for a new email service (Microsoft 365, Google Workspace, SendGrid), verify the DNS record is published and properly formatted.

Confirm DKIM is correctly configured before sending production email.

Security Engineer

Key Rotation Verification

During DKIM key rotation, verify both old and new keys are published before switching. Confirm old keys are revoked after rotation.

Ensure seamless key rotation without email delivery disruption.

Security Analyst

Email Infrastructure Discovery

Discover which email services a domain uses by finding their DKIM selectors (e.g., "google" for Gmail, "selector1" for Microsoft 365, "k1" for Mailchimp).

Map email infrastructure for security assessments or competitive analysis.

Compliance Auditor

Key Strength Assessment

Verify DKIM key lengths meet minimum requirements (RSA 2048-bit recommended by M3AAWG) and identify any legacy 1024-bit keys that need upgrading.

Ensure cryptographic key strength meets current security standards.

Parameters

NameLocationTypeRequiredDescription
domainquerystringRequiredThe domain to check DKIM records forExample: google.com
selectorsquerystringOptionalComma-separated list of custom DKIM selectors to check in addition to common selectors.Example: google,selector1,myapp

Response Fields

Result fields below are inside the JSON data object. Any row named meta describes the sibling response metadata object. See response and error handling for status codes and error responses. Optional observations may be absent or null; inspect warnings and partial-failure fields before treating a missing result as a negative finding.

FieldTypeDescription
domainstringThe queried domain
dkim.foundbooleanWhether any DKIM records were found
dkim.selectors_checkedarrayAll selectors that were probed
dkim.found_selectorsarrayDiscovered DKIM records with selector, record, key_type (rsa/ed25519), key_length, key_fingerprint (SHA-256 hex of the normalised public key — stable across runs for rotation tracking), algorithm (rsa-1024/rsa-2048/rsa-4096/ed25519), is_testing, and dnssec_validated
dkim.dual_signing_detectedbooleanTrue when both RSA (≥2048-bit) and Ed25519 active selectors exist — the 2026 M3AAWG best practice for forward compatibility
dkim.algorithms_in_usearrayDistinct algorithms across active selectors (e.g. ["rsa-2048", "ed25519"])
dkim.duplicate_public_keysarraySelectors that publish the same public key — defeats the purpose of rotation
scorenumberSecurity score 0–100 based on key strength and configuration
gradestringLetter grade A–F
recommendationsarrayKey strength and configuration recommendations

Code Examples

Replace YOUR_API_KEY with your API key. This endpoint requires the developer plan or higher; see plans and usage limits.

cURL
curl --request GET 'https://api.edgedns.dev/v1/security/dkim?domain=google.com' \
  --header "Authorization: Bearer YOUR_API_KEY"
JavaScript
const response = await fetch(
  "https://api.edgedns.dev/v1/security/dkim?domain=google.com",
  {
    "method": "GET",
    "headers": {
      "Authorization": "Bearer YOUR_API_KEY"
    }
  }
);

if (!response.ok) {
  throw new Error(`EdgeDNS returned HTTP ${response.status}`);
}
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    'GET',
    "https://api.edgedns.dev/v1/security/dkim?domain=google.com",
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    timeout=60,
)
response.raise_for_status()
data = response.json()
print(data)

Read the full DKIM Check guide

Learn the concepts, choose a practical workflow, and interpret the observations from DKIM Check before acting on them. Run supported checks via MCP or through REST.

Read the guide →

Related Endpoints

External References

Learn more about the standards and protocols behind this endpoint.

Try This Endpoint

Test the DKIM Check endpoint live in the playground.

DKIM Check API Reference | EdgeDNS