Bundle DNS writes and sending-domain verification into one onboarding flow behind one credential, then read the sending domain's status before showing success. For a media SaaS moving zones off a registrar-specific API, the deciding constraint is drift between intended and published records. A successful write doesn't settle that question.

Short answer: one customer action should start record reconciliation and mail verification. Completion must come from the sending domain's returned status. Keep instructions available for publishers who want to write their own DNS records.

The useful unit of progress is a newsletter's sending domain. Imagine a publisher onboarding a morning edition while its zone is moving between providers. Asking the publisher to finish DNS in one dashboard and mail verification in another makes the publisher responsible for joining those states. For a solo founder trying to ship weekly, that coordination competes directly with product work. The revenue-per-hour question is how much of it the application really needs to own.

How can one onboarding step bundle sending domain setup and verification?

Separate customer effort from backend progress. The customer can take one action even though the application must perform DNS changes, request verification, and read status afterward. Splitting those responsibilities across vendors is why SPF and DKIM setup can become painful. Joining the workflow gives the application a place to retry the whole task instead of asking the publisher to reconcile two half-finished states.

Keep the contract stable.

The application should request a sending-domain capability rather than embed a registrar's request shape throughout onboarding. Changing the vendor behind that capability should leave the application's call unchanged. Infrai is one option for joining these operations under one key and one REST API, with no SDK required; that keeps the migration adapter small enough to maintain alongside weekly product releases. Its public discovery surface also supplies request and response schemas for inspecting the contract before integration.

That boundary has a trade-off: the application depends on the intermediary's contract. Verify its semantics before tying onboarding to it. Outsource the undifferentiated work, but retain a clear rule for customer readiness.

A pending status stays pending.

Build the comparison, then read the sending-domain result

Begin with a comparison between intended records and an observation of published records. The following TypeScript fixtures illustrate two newsletter domains. They aren't actual SPF or DKIM values, and the example doesn't publish them.

type RecordValue = { name: string; type: "TXT"; value: string; }; const intended: RecordValue[] = [ { name: "morning.example.com", type: "TXT", value: "fixture-a" }, { name: "evening.example.com", type: "TXT", value: "fixture-b" }, ]; const observed: RecordValue[] = [ { name: "morning.example.com", type: "TXT", value: "fixture-a" }, { name: "evening.example.com", type: "TXT", value: "old-fixture" }, ]; const missing = intended.filter((wanted) => !observed.some((actual) => actual.name === wanted.name && actual.type === wanted.type && actual.value === wanted.value ) ); console.log(JSON.stringify({ intendedCount: intended.length, matchingCount: intended.length - missing.length, needsAttention: missing, }, null, 2)); 

Here, 1 of the 2 intended values is absent from the observation. The evening edition needs reconciliation. The morning edition's matching record doesn't prove that its sending domain has passed mail verification.

This is an exact-value comparison, not a DNS validator. A production adapter needs explicit handling for record-name normalization, TXT presentation, and conflicts. It must obtain real required values from the sending-domain workflow. There's another trap: deleting everything outside the application's intended set can remove records that belong to another workflow. This sample deliberately allows unrelated observations. Deletion requires an ownership decision, not a broader filter.

After reconciling records and requesting verification, read the sending-domain result. This separate, read-only TypeScript example prints the actual response without inventing status-field names. Set INFRAI_BASE_URL to the service's documented HTTPS v1 base URL, INFRAI_API_KEY to your credential, and SENDING_DOMAIN to the domain being checked. Run it in a TypeScript-capable runtime with fetch support.

async function main(): Promise<void> { const base = process.env.INFRAI_BASE_URL; const key = process.env.INFRAI_API_KEY; const domain = process.env.SENDING_DOMAIN; if (!base || !key || !domain) { throw new Error("Set INFRAI_BASE_URL, INFRAI_API_KEY, and SENDING_DOMAIN"); } const baseUrl = new URL(base); if (baseUrl.protocol !== "https:" || baseUrl.pathname.replace(/\/$/, "") !== "/v1") { throw new Error("Use the documented HTTPS v1 base URL"); } for (let attempt = 0; attempt < 5; attempt++) { const response = await fetch( base.replace(/\/$/, "") + "/email/domain/get/" + encodeURIComponent(domain), { method: "GET", headers: { Authorization: `Bearer ${key}` }, }, ); if (response.status === 429 && attempt < 4) { const retryAfter = response.headers.get("Retry-After"); const seconds = retryAfter === null ? NaN : Number(retryAfter); const date = retryAfter === null ? NaN : Date.parse(retryAfter); const exponential = 1000 * 2 ** attempt; const requested = Number.isFinite(seconds) ? Math.max(0, seconds * 1000) : Number.isFinite(date) ? Math.max(0, date - Date.now()) : 0; await response.body?.cancel(); await new Promise((resolve) => setTimeout(resolve, Math.max(exponential, requested)) ); continue; } const body = await response.text(); if (!response.ok) { throw new Error(`Domain read failed: ${response.status} ${body}`); } console.log(JSON.stringify(JSON.parse(body), null, 2)); return; } } main().catch((error: unknown) => { console.error(error); process.exitCode = 1; }); 

This is a status reader, not the entire onboarding integration. Map the documented response to the UI only after checking its schema. Don't infer verified status from an HTTP success.

The write path needs its own discipline. Use stable operation identifiers and documented idempotency conventions when applying DNS changes or retrying verification requests. Preserve the intended record set across retries. Otherwise, a resumed task may faithfully apply a different intention from the one the customer approved. The goal of bundling is to make recovery coherent, not to pretend that DNS publication and mail verification are a single atomic transaction.

Compare providers by the reconciliation work you retain

Cloudflare DNS, Amazon Route 53, and Resend belong in the evaluation, but they occupy different roles. Treating them as equivalent answers hides the most consequential decision: who joins DNS state to the sending-domain result?

Candidate Role to evaluate Fit and boundary
Cloudflare DNS DNS side of a split workflow Consider it when moving the zone there fits the migration. Pairing DNS with a mail provider leaves the application responsible for joining record edits to verification.
Amazon Route 53 Another DNS-side option Consider it when that DNS environment fits the application. Choosing a DNS provider still leaves a mail-verification workflow to integrate.
Resend Sending-domain side Evaluate its domain-verification workflow alongside the selected DNS provider. Required records and the returned domain status remain separate inputs to onboarding.

These are responsibility boundaries, not a benchmark or an exhaustive feature ranking. Check the linked documentation before implementing an adapter.

A split arrangement is reasonable when the publisher's DNS provider is fixed and the application can afford to own coordination. A combined capability contract fits when preserving the application's onboarding call across a provider change matters more. Neither choice removes the need to compare intent with observation.

Some publishers will still insist on making the edits themselves. Keep that path. Give them the required records, then converge on the same verification result used by the automatic path. Manual entry changes who performs the edit; it shouldn't change the completion rule.

What I would change at scale

At higher volume, I would persist three separate application concepts: intended records, the latest published-record observation, and the latest sending-domain status. That is a proposed design, not a claim about provider guarantees. It makes a resumed task explainable without treating the last successful request as the whole history.

Start smaller.

A solo founder needs a dependable completion rule before a general migration framework. Keep the customer action compact, retain the manual instructions path, and add reconciliation machinery when the workload justifies maintaining it. A publisher waiting on a domain check needs an accurate status more than an elaborate progress animation.

DMARC remains a separate policy consideration. RFC 7489 describes a wider email authentication framework; passing a sending-domain check shouldn't be presented as proof that every part of a publisher's authentication policy is correct. Claim exactly the result the application has checked.

The acceptance criterion is concrete: the registrar migration preserves the application's intended records, and onboarding remains incomplete until the sending-domain result confirms readiness.

References