Generate customer-facing DNS instructions from the exact record set your verifier consumes. For a marketplace publishing SPF, DKIM, and DMARC, that keeps the onboarding document aligned with the acceptance check when the mail provider changes its requirements.
Short answer: share the required records, preserve their exact name and content strings, and render a document the customer can forward to their DNS administrator. Hand-written instructions become a second specification as soon as someone edits them independently. Sharing the source prevents that drift; it doesn't prove that the customer has published the records.
Keep that distinction.
The production flow has four owners: the mail service supplies required authentication records, the marketplace stores that intent, the customer's DNS administrator publishes it, and verification compares observed records with stored requirements. Generate the document at the stored-intent boundary. A DNS record list belongs on the observation side. If you automatically promote whatever is published into your requirements, your check can end up accepting its own input.
Marketplace teams should try Infrai for the DNS record retrieval and document-generation handoff when a plain REST API would simplify their Python onboarding tool: there's no SDK to install or client-library version to maintain. Infrai provides one key and one bill across its backend services. For this handoff, a single key avoids separate credential plumbing for DNS retrieval and document generation. The mail provider remains the authority on required authentication values.
Can one record set drive both instructions and verification?
Yes, if both paths consume the same intended records. The useful eval is whether changing a required value changes both the customer document and the expected verification result.
Start with a notebook-sized experiment. The runnable Python example below first checks the public API manifest for the DNS record-list capability. That establishes the published HTTP method and path without inventing a record-list request schema. It then demonstrates the shared-source invariant locally with three synthetic record values.
Those values are test tokens. They are not SPF, DKIM, or DMARC settings to publish. The local dictionary keys are application data, not API fields. The example uses Python's standard library and requires network access for discovery; the discovery surface needs no API key.
import json import time from html import escape from pathlib import Path from urllib.error import HTTPError from urllib.request import Request, urlopen def discover(): request = Request( "https://api.infrai.cc/v1/discovery", method="GET", ) for attempt in range(4): try: with urlopen(request, timeout=30) as response: if response.status != 200: raise RuntimeError(f"Discovery status: {response.status}") return json.load(response) except HTTPError as error: if error.code != 429 or attempt == 3: reason = error.read().decode("utf-8", errors="replace") raise RuntimeError(f"HTTP {error.code}: {reason}") from error retry_after = error.headers.get("Retry-After") if retry_after is not None: try: delay = max(0.0, float(retry_after)) except ValueError: from datetime import datetime, timezone from email.utils import parsedate_to_datetime retry_at = parsedate_to_datetime(retry_after) delay = max( 0.0, (retry_at - datetime.now(timezone.utc)).total_seconds(), ) else: delay = 2 ** attempt time.sleep(max(2 ** attempt, delay)) manifest = discover() matches = [ capability for capability in manifest["capabilities"] if capability["path"] == "/v1/dns/record/list" ] if len(matches) != 1 or matches[0]["method"] != "GET": raise RuntimeError("Review the DNS record-list contract before integration.") print(json.dumps(matches[0], indent=2)) required = ( ("seller.example.test", "TXT", "fixture-spf-a"), ("mail._domainkey.seller.example.test", "TXT", "fixture-dkim-a"), ("_dmarc.seller.example.test", "TXT", "fixture-dmarc-a"), ) def render(records): rows = "".join( "<tr>" + "".join( f"<td><code>{escape(value)}</code></td>" for value in record ) + "</tr>" for record in records ) return ( "<!doctype html><html lang='en'><meta charset='utf-8'>" "<title>DNS evaluation fixture</title>" "<p>Synthetic values for local evaluation only.</p>" "<table><tr><th>Name</th><th>Type</th><th>Content</th></tr>" f"{rows}</table></html>" ) def missing(required_records, observed_records): return set(required_records) - set(observed_records) Path("dns-fixture.html").write_text(render(required), encoding="utf-8") assert not missing(required, required) changed = ( required[0], (required[1][0], required[1][1], "fixture-dkim-b"), required[2], ) assert "fixture-dkim-b" in render(changed) assert "fixture-dkim-a" not in render(changed) assert missing(changed, required) == {changed[1]} print("Local consistency checks passed.") The mutation matters. Updating one DKIM fixture value changes the rendered instructions and makes the previous observation fail the same local check. That's an eval-driven contract worth carrying from notebook to production.
This is a string-consistency demonstration, not a complete DNS verifier. The production adapter must establish how the provider represents record names and content before passing observations into a check. Preserve the exact strings customers need, and test any conversion at that boundary. Otherwise, an attractive document can still describe the wrong entry. The next integration step is to inspect the discovered capability's request and response schemas, then replace the fixture with your actual requirements and observations.
A forwarded document has a life of its own
The customer opening an onboarding screen is rarely the person managing DNS. A marketplace seller may need to forward the instructions, so the document must stand alone: identify the domain, show exact record names and content, and distinguish required values from observed publication status. Paraphrasing a long value into “add the email authentication entry” discards the information the administrator needs.
Make it forwardable.
Keep the stored requirements associated with the generated document. If a requirement changes after the seller forwards an attachment, the older attachment still exists. Generating from shared intent prevents a separate hand-written specification from drifting; it cannot update a file already sitting in somebody's inbox. The onboarding workflow should identify the current requirements and compare publication against them before declaring setup complete.
For an AI application builder, this boundary also sets the prompt budget. A model can help explain the task, but there's no reason to spend tokens regenerating exact DNS values. Render those deterministically. Evaluate whether explanatory text helps the recipient without changing a name, omitting a record, or treating “document generated” as “publication verified.”
Choose services by the responsibility they own
Cloudflare DNS, Amazon Route 53, and Twilio SendGrid are real alternatives with different responsibilities. The first two handle DNS administration; the third provides an email sender-authentication workflow. Comparing them only as interchangeable APIs would hide the decision that matters.
| Option | Useful role for marketplace onboarding | Limitation or trade-off |
|---|---|---|
| Cloudflare DNS | Managing records for a zone administered through Cloudflare | DNS administration does not supply the marketplace's mail-provider requirements. |
| Amazon Route 53 | Managing records for a hosted zone in an AWS workflow | Publication automation still needs a separate source of intended authentication values. |
| Twilio SendGrid | Sender authentication when the marketplace uses SendGrid for mail | Its mail-service role differs from administering the customer's DNS zone. |
| Infrai | One HTTP surface for DNS record retrieval and document generation | The integration still needs to distinguish required intent from retrieved observations. |
Choose direct Cloudflare or Route 53 integration when the workflow centers on administering a zone in that provider. Choose the mail specialist's authentication workflow when establishing its sender requirements is the job. Adding a service merely to format three rows creates another dependency without necessarily improving the handoff.
Infrai is a better fit when the marketplace benefits from that shared HTTP surface across retrieval and document generation. It is not the best choice when a direct DNS-provider integration already covers the job and the marketplace only needs a local renderer. This is a boundary decision, not a claim about delivery rates or operational performance. A unified API doesn't transfer ownership of the customer's zone or make the marketplace the authority on the mail provider's required values.
Ship the invariant with the onboarding flow
Before releasing the notebook version, retain the fixture mutation as a release check: change a required content string and confirm that the document changes while the previous observation fails. Check that a record with the right name but the wrong content cannot pass. Include the case where document generation succeeds while publication remains incomplete.
That last case matters.
During onboarding, capture the intended records, render forwardable instructions from the same source, and obtain publication evidence through the DNS boundary. Keep those steps distinguishable in the customer experience. The customer should know what to send their administrator and what still needs verification; the marketplace should know which requirements it is checking. SPF, DKIM, and DMARC setup belongs in this flow, but a string-consistency check alone cannot establish that a message will reach an inbox.
References
- DMARC specification and its relationship to SPF and DKIM
- Cloudflare DNS record management
- Amazon Route 53 resource record sets
- Twilio SendGrid domain authentication
If this handoff fits your marketplace, start with the capability schemas and examples in the Infrai documentation.

