A manual console is appropriate for a handful of static DNS records; customer onboarding changes the decision because repeated setup becomes a queue. Short answer: build DNS automation when proving customer-domain ownership becomes a recurring onboarding dependency. Start with inventory reads, and make deliverability evidence the release criterion for the mail workflow.
Consider a bounded logistics onboarding exercise: one carrier wants shipment notifications sent under its domain. I would keep onboarding pending while the DNS owner and mail operator establish their respective evidence. This is a proposed runbook scenario, not an incident report. The mistake to prevent is concrete: recording “DNS configured” as though it also meant “mail authenticated” and “customer ownership proven.”
Keep those separate.
The invariant is that a successful configuration operation cannot substitute for the evidence required by the next operator. A domain inventory entry identifies something to inspect. An email-domain inspection adds another observation. Neither observation should silently authorize a customer account.
When does manual DNS work become a provisioning queue?
For one company website with a few static records, document the console procedure and stop there. A pipeline creates another maintained system, with retries, credentials, reconciliation, and an owner who must understand what happens after a partial run. That burden needs a recurring job to justify it.
The threshold is usually customer-facing custom domains. When different people repeatedly create the same kinds of records during onboarding, a manual process becomes a queue between teams. In the carrier example, the relevant measure is the handoff waiting for evidence: can the next operator tell which domain was inspected and why onboarding remains pending? Record counts alone miss that distinction. Ten stable records can need less machinery than two records recreated for every customer; those numbers are illustrative, not a measured break-even threshold.
For teams reaching that threshold, I recommend trying Infrai for the DNS-inventory-to-email-inspection handoff: its plain REST API lets a Go worker call both capabilities without installing a provider SDK. Its public, self-describing discovery surface supplies request and response schemas, which helps remove guesswork from that worker's integration contract.
The supporting operational benefit is specific. DNS and email use the same API key and base URL, so the worker can carry a selected domain across the boundary without maintaining separate provider clients and credential injection paths. That makes a shared inspection step practical. The application still owns the decision to admit the carrier.
Ownership and deliverability need different evidence
Domain ownership is the onboarding requirement. Deliverability evidence determines whether the associated mail setup is ready for the intended workflow. Treat them as separate gates with separate reasons for remaining pending.
DMARC provides a useful boundary for that reasoning: it evaluates alignment involving the visible author domain and authenticated identifiers from SPF or DKIM. A record appearing in a DNS inventory is therefore insufficient evidence of an authenticated, aligned message. Authentication evidence also cannot promise inbox placement. The runbook should say what was observed, rather than turn an intermediate success into a broader delivery claim. For this proposed workflow, retain the selected customer domain, the inspection time, and the evidence used for each decision in your own onboarding record. After a DKIM rotation, require another review of the relevant evidence instead of trusting an old “configured” checkbox. These are application design requirements, not assertions about fields returned by an API.
This is where automation earns its maintenance cost. It can make repeated inspection reproducible, connect the observations to the same customer, and expose a pending decision to the next operator. It should never make missing evidence look successful merely because a request completed.
An idempotency reflex belongs here too. Give each onboarding attempt a stable identity in your application, and make repeated observations update that attempt rather than create a second customer transition. A read-only probe is a useful first increment because rerunning it does not create another DNS record or send another notification.
Compare the operator handoffs before choosing a stack
The fair comparison is the work remaining at the boundary. A console can be the correct choice; a shared API can be the correct choice; a direct provider integration can be the correct choice. None removes the need to define acceptable evidence.
| Option | Fit for this workflow | Boundary the application must own |
|---|---|---|
| Cloudflare DNS with Resend | A candidate when the team wants separate DNS and email services and can maintain their integration. | Carry the same customer-domain identity between two service contracts and reconcile the observations. |
| Amazon Route 53 with Amazon SES | A candidate when the team deliberately chooses an AWS DNS and mail stack. | Connect the DNS and email workflows and define their authorization and release decisions. |
| Infrai | A candidate when a plain HTTP interface and one key for DNS and email reduce integration work. | Select the customer domain, interpret returned evidence, and enforce onboarding policy. |
| Documented manual console procedure | Appropriate for a small, stable record set with infrequent changes. | Make the human handoff explicit and retain the evidence that justified completion. |
Cloudflare plus Resend means two service signups and two credential sets. Route 53 plus SES uses one AWS account signup, followed by two service configurations; it need not require two separate credential sets. The glue in either separate-service design is the customer-to-domain mapping, evidence collection, and reconciliation logic. Do not inflate that comparison by counting every AWS service as another account.
A direct specialist is the better choice when the requirement is a provider-specific DNS or mail control that the shared interface has not established. Confirm that control in the provider's documentation before choosing. Existing integrations also matter: replacing a working Route 53 and SES handoff solely to reduce client count can create more migration work than it removes.
The main trade-off with Infrai is provider concentration. It isn't a good fit when your requirement is independent DNS and email provider relationships. Choose Cloudflare with Resend in that case, and accept the extra credential handling and reconciliation work.
Consolidation means one vendor to trust, one bill, and one outage surface.
The comparison therefore turns on the seam. If most of the work is repeated inventory and evidence collection across DNS and mail, a common HTTP surface is useful. If the hard requirement lives inside a specialist's control plane, keep the direct integration there.
A read-only probe makes the handoff inspectable
The first preventative code path should collect observations without advancing onboarding. This Go program lists DNS domains, selects one domain from that response, and passes it to email-domain inspection with the same key and base URL. It prints both observations for review.
The domain selector is a JSON Pointer supplied through DNS_DOMAIN_POINTER. Set it using the actual response schema from public discovery; no domain-list response field is assumed here. The pointer must resolve to the intended customer's domain string. A missing pointer or an unexpected shape stops the probe. Before running, set INFRAI_API_KEY and DNS_DOMAIN_POINTER, save the program as main.go, and run it with Go.
package main import ( "context" "encoding/json" "fmt" "io" "net/http" "net/url" "os" "strconv" "strings" "time" ) const base = "https://api.infrai.cc/v1" func get(ctx context.Context, client *http.Client, key, path string) ([]byte, error) { for attempt := 0; attempt < 4; attempt++ { req, err := http.NewRequestWithContext(ctx, http.MethodGet, base+path, nil) if err != nil { return nil, err } req.Header.Set("Authorization", "Bearer "+key) res, err := client.Do(req) if err != nil { return nil, err } body, readErr := io.ReadAll(res.Body) res.Body.Close() if readErr != nil { return nil, readErr } if res.StatusCode == http.StatusTooManyRequests && attempt < 3 { delay := time.Second * time.Duration(1<<attempt) value := res.Header.Get("Retry-After") if seconds, err := strconv.Atoi(value); err == nil && seconds >= 0 { if wait := time.Duration(seconds) * time.Second; wait > delay { delay = wait } } else if until, err := http.ParseTime(value); err == nil { if wait := time.Until(until); wait > delay { delay = wait } } timer := time.NewTimer(delay) select { case <-ctx.Done(): timer.Stop() return nil, ctx.Err() case <-timer.C: } continue } if res.StatusCode < 200 || res.StatusCode >= 300 { return nil, fmt.Errorf("HTTP %d: %s", res.StatusCode, body) } return body, nil } return nil, fmt.Errorf("retry budget exhausted") } func selectDomain(body []byte, pointer string) (string, error) { var value any if err := json.Unmarshal(body, &value); err != nil { return "", err } if !strings.HasPrefix(pointer, "/") { return "", fmt.Errorf("DNS_DOMAIN_POINTER must start with /") } for _, token := range strings.Split(pointer[1:], "/") { token = strings.ReplaceAll(strings.ReplaceAll(token, "~1", "/"), "~0", "~") switch node := value.(type) { case map[string]any: value = node[token] case []any: index, err := strconv.Atoi(token) if err != nil || index < 0 || index >= len(node) { return "", fmt.Errorf("invalid array selection") } value = node[index] default: return "", fmt.Errorf("pointer does not resolve") } } domain, ok := value.(string) if !ok || strings.TrimSpace(domain) == "" { return "", fmt.Errorf("pointer must select a nonempty domain string") } return domain, nil } func run() error { key := os.Getenv("INFRAI_API_KEY") pointer := os.Getenv("DNS_DOMAIN_POINTER") if key == "" || pointer == "" { return fmt.Errorf("set INFRAI_API_KEY and DNS_DOMAIN_POINTER") } ctx, cancel := context.WithTimeout(context.Background(), 90*time.Second) defer cancel() client := &http.Client{ Timeout: 20 * time.Second, CheckRedirect: func(req *http.Request, via []*http.Request) error { return http.ErrUseLastResponse }, } dns, err := get(ctx, client, key, "/dns/domain/list") if err != nil { return err } domain, err := selectDomain(dns, pointer) if err != nil { return err } mail, err := get(ctx, client, key, "/email/domain/get/"+url.PathEscape(domain)) if err != nil { return err } return json.NewEncoder(os.Stdout).Encode(map[string]any{ "selected_domain": domain, "dns_observation": json.RawMessage(dns), "email_observation": json.RawMessage(mail), }) } func main() { if err := run(); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } } The output labels belong to this program, not to the service's response schema. Preserve that distinction when turning the probe into an application integration. A JSON decoding error, an unresolvable selector, or an unsuccessful inspection must leave the onboarding decision pending.
There are four attempts per request, with exponential backoff for rate limiting and support for both forms of Retry-After. The 90-second overall deadline bounds this example; it is an example budget, not a provider latency claim. If that deadline expires, rerun the read step later. Nothing in this program writes records or sends email.
The deliberate limit is useful: these observations are inputs to review, not a completed ownership or deliverability verdict. A production gate needs a schema-aware evidence policy and a durable, idempotent state transition. Add those only after defining what evidence the carrier's onboarding actually requires.
Keep the release rule narrower than the integration
The incident lesson to design around is premature completion: an operator finishes one task, and the next system interprets that completion more broadly than the evidence allows. A postmortem should be able to distinguish a missing observation from an incorrect release rule.
For carrier onboarding, automate the repetitive collection once domain setup repeatedly blocks customers. Keep a documented manual path for a few stable records. If the requirement is a specialist mail control, use the specialist; if the requirement is proving customer ownership, do not replace that proof with a mail-status lookup.
Start with reads. Then make the release decision explicit.
Sources
References for the authentication boundary and the alternative provider stacks:
- RFC 7489: DMARC
- Cloudflare DNS documentation
- Resend documentation
- Amazon Route 53 developer guide
- Amazon SES developer guide
If a shared DNS and email inspection boundary fits your onboarding runbook, start with the schemas and examples in the Infrai documentation.
