Tinplate 42 Edge APIs

Email & Domain Tier 2 Ready POST /v1/email-dns-generator

SPF & DMARC Record Generator & Linter API — Build Valid Email Auth TXT Records

Lint existing SPF/DMARC strings and generate clean, RFC-compliant DNS TXT records. Generate and lint RFC-compliant SPF, DMARC, MTA-STS, TLS-RPT, and BIMI DNS TXT records from structured sender configuration.

Try It Live in Your Browser · No API Key Required

1. Interactive Sandbox & Sample JSON Output

200 OK · Ready

Editable Request JSON (POST /v1/email-dns-generator)

Live 200 OK Response Envelope

{
  "ok": true,
  "data": {
    "domain": "example.com",
    "records": {
      "spf": {
        "type": "TXT",
        "host": "example.com",
        "value": "v=spf1 ip4:203.0.113.10/32 include:_spf.google.com include:sendgrid.net -all"
      },
      "dmarc": {
        "type": "TXT",
        "host": "_dmarc.example.com",
        "value": "v=DMARC1; p=quarantine; sp=quarantine; adkim=s; aspf=s; pct=100; rua=mailto:dmarc-reports@example.com;"
      },
      "tls_rpt": {
        "type": "TXT",
        "host": "_smtp._tls.example.com",
        "value": "v=TLSRPTv1; rua=mailto:dmarc-reports@example.com"
      },
      "mta_sts_txt": {
        "type": "TXT",
        "host": "_mta-sts.example.com",
        "value": "v=STSv1; id=2026111401"
      }
    },
    "spf_estimated_dns_lookups": 5,
    "spf_within_10_lookup_limit": true,
    "lint_issues": []
  },
  "meta": {
    "request_id": "req_edg_01",
    "ms": 1
  }
}

2. Quickstart Code Examples

Full TypeScript & Python SDK →
curl -X POST "https://api.tinplate.dev/v1/email-dns-generator" \
  -H "Content-Type: application/json" \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -d '{"domain":"example.com","providers":["google_workspace","sendgrid"],"ip4":["203.0.113.10/32"],"spf_mode":"hardfail","dmarc_policy":"quarantine","dmarc_rua":["mailto:dmarc@example.com"]}'
import { TinplateClient } from "@tinplate/sdk"; // npm install @tinplate/sdk

const tinplate = new TinplateClient({
  rapidApiKey: process.env.RAPIDAPI_KEY!,
});

const { data, meta } = await tinplate.call("/v1/email-dns-generator", {
  "domain": "example.com",
  "providers": [
    "google_workspace",
    "sendgrid"
  ],
  "ip4": [
    "203.0.113.10/32"
  ],
  "spf_mode": "hardfail",
  "dmarc_policy": "quarantine",
  "dmarc_rua": [
    "mailto:dmarc@example.com"
  ]
});
console.log(`[${meta.ms} ms]`, data);
import requests

response = requests.post(
    "https://api.tinplate.dev/v1/email-dns-generator",
    headers={
        "Content-Type": "application/json",
        "X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
    },
    json={
  "domain": "example.com",
  "providers": [
    "google_workspace",
    "sendgrid"
  ],
  "ip4": [
    "203.0.113.10/32"
  ],
  "spf_mode": "hardfail",
  "dmarc_policy": "quarantine",
  "dmarc_rua": [
    "mailto:dmarc@example.com"
  ]
}
)
print(response.json())
const response = await fetch("https://api.tinplate.dev/v1/email-dns-generator", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
  },
  body: JSON.stringify({
  "domain": "example.com",
  "providers": [
    "google_workspace",
    "sendgrid"
  ],
  "ip4": [
    "203.0.113.10/32"
  ],
  "spf_mode": "hardfail",
  "dmarc_policy": "quarantine",
  "dmarc_rua": [
    "mailto:dmarc@example.com"
  ]
}),
});
const result = await response.json();
console.log(result);
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "tinplate_email_dns_generator",
    "arguments": {
      "domain": "example.com",
      "providers": [
        "google_workspace",
        "sendgrid"
      ],
      "ip4": [
        "203.0.113.10/32"
      ],
      "spf_mode": "hardfail",
      "dmarc_policy": "quarantine",
      "dmarc_rua": [
        "mailto:dmarc@example.com"
      ]
    }
  }
}
OpenAPI 3.0.3 Schema Contract

Request Parameters & Response Schema Reference

Request Body Parameters (POST /v1/email-dns-generator)

Parameter Type & Constraints Description
domainrequired string
minLen: 3, maxLen: 253
Target email domain.
providersoptional string[]
default: []
Known ESPs whose official SPF includes should be added.
custom_includesoptional string[]
default: []
Field 'custom_includes'
ip4optional string[]
default: []
Field 'ip4'
ip6optional string[]
default: []
Field 'ip6'
allow_mxoptional boolean
default: false
Field 'allow_mx'
allow_aoptional boolean
default: false
Field 'allow_a'
spf_policyoptional "hardfail" | "softfail" | "neutral"
default: "hardfail"
Field 'spf_policy'
dmarc_policyoptional "none" | "quarantine" | "reject"
default: "reject"
Field 'dmarc_policy'
dmarc_subdomain_policyoptional "none" | "quarantine" | "reject" Field 'dmarc_subdomain_policy'
dmarc_pctoptional integer
min: 1, max: 100, default: 100
Field 'dmarc_pct'
rua_emailsoptional string[]
default: []
Field 'rua_emails'
ruf_emailsoptional string[]
default: []
Field 'ruf_emails'
adkimoptional "r" | "s"
default: "s"
Field 'adkim'
aspfoptional "r" | "s"
default: "s"
Field 'aspf'
existing_spfoptional string
maxLen: 1024
Optional existing SPF TXT record to lint for RFC 7208 errors.
existing_dmarcoptional string
maxLen: 1024
Optional existing DMARC TXT record to lint for RFC 7489 errors.

Response data Object Fields (200 OK)

Field Type Description
domain string Field 'domain'
records object Field 'records'
spf_estimated_dns_lookups integer Field 'spf_estimated_dns_lookups'
spf_within_10_lookup_limit boolean Field 'spf_within_10_lookup_limit'
lint_issues object[] Field 'lint_issues'

3. What SPF, DKIM & DMARC Record Linter & Generator API Detects & Validates

Honest Engineering Boundaries

4. Known Limitations & Test Verification

Release Version: v1.0.7 · Last Verified / Benchmarked: 14 November 2026 · Latency Note: Sub-millisecond figures measure in-Worker V8 compute time (typical client HTTPS network RTT to the nearest Cloudflare PoP is 15–65 ms) · See Full Portfolio Benchmarks & Corpora →

5. Marketplace Plans & Payload Quotas

Plan Monthly Price Included Requests Rate Limit Max Request Payload Best For
BASIC $0.00 / month 500 / month (hard limit) 10 req / min 64 KB Evaluation, local development & CI smoke tests
PRO $9.99 / month 15,000 / month 60 req / min 128 KB Solo developers & production apps
ULTRA $29.99 / month 100,000 / month 300 req / min 256 KB Growing SaaS & multi-agent pipelines
MEGA $79.99 / month 500,000 / month 1,000 req / min 256 KB High-volume enterprise workloads

6. Frequently Asked Questions

How does this complement the Email DNS Auditor API?

Email DNS Auditor (/v1/email-dns) inspects live domain DNS records, while Email DNS Generator (/v1/email-dns-generator) builds and repairs the exact TXT records your users need to paste into their DNS provider.

Does it handle the 255-character DNS TXT string limit?

Yes, it flags records exceeding 255 characters and provides properly quoted multi-string splits.

Which email providers have built-in include presets?

Google Workspace, Microsoft 365, SendGrid, Amazon SES, Mailgun, Postmark, Mailchimp, Resend, and HubSpot.

Zero Payload Logging

7. Data Handling, Privacy & Marketplace Proxy Disclosure

100% deterministic in-memory execution; zero network calls or logging.

Worker Zero-Logging Guarantee: Cloudflare Workers Observability and invocation logging are disabled in configuration (observability.enabled = false, head_sampling_rate = 0, invocation_logs = false). Payloads are processed strictly in volatile V8 memory and never logged or stored by Tinplate.

Marketplace Proxies vs. Direct Bearer Key: Requests sent via RapidAPI or Zyla API Hub pass through those marketplaces' proxy infrastructure (subject to their respective privacy policies). Security-sensitive workloads requiring end-to-end zero-intermediary processing can connect directly to https://api.tinplate.dev using a Direct Bearer Key (Authorization: Bearer <API_KEY>). Read our full Privacy Notice and OpenAPI 3.0.3 JSON Schema.

Related Tinplate APIs

📧 POST /v1/email-dns Live on Hub

Email DNS Deliverability Auditor API

Audit MX, SPF 10-lookup limits, DMARC, DKIM, BIMI, and MTA-STS with a 0–100 score.

🚫 POST /v1/signup-fraud Compliance & Business

Signup Fraud & Disposable Email Scorer API

Block disposable emails, alias abuse, and bot signups with a 0–100 fraud risk score.

🔒 POST /v1/security-headers Security & Secrets

HTTP Security Header Scanner API

Audit CSP, HSTS, and browser security headers with an A+ to F grade and fix snippets.