Skip to main content

Overview

The Automatic DNS API operates only on existing TenantCore domain resources. You cannot submit an arbitrary domain or Microsoft tenant and ask TenantCore to modify it. The required ownership chain is:
If the domain does not exist in TenantCore, or its parent tenant belongs to another account, the API returns 404 domain_not_found before any DNS-provider action is attempted.
Automatic DNS is currently supported through TenantCore’s direct Porkbun, Cloudflare, and Namecheap integrations. DNS-provider credentials are connected and managed inside the TenantCore application; this public API does not accept raw registrar credentials.
All write requests require an Idempotency-Key. Live planning/readiness calls perform external DNS/provider reads and therefore use the public API’s expensive rate-limit bucket.

Get stored DNS state

Returns TenantCore’s most recently stored DNS/authentication state for an owned domain.
domain_id is the TenantCore domain-row UUID returned by the domain APIs. It is not a domain name.
Example response:
This endpoint reads stored state. Use Build a live DNS plan when you need a fresh public-DNS/provider comparison.

Build a live DNS plan

Performs a fresh provider-neutral DNS read and compares the domain with TenantCore’s required Microsoft 365 records.
The response includes:
  • detected authoritative DNS provider
  • desired records
  • observed records
  • create/update/preserve/conflict actions
  • whether the DNS read is reliable
  • blocking changes that prevent automatic completion
This is a read-only operation. It does not change DNS.

Check automatic-DNS readiness

Checks whether TenantCore can safely apply the current plan through the connected provider.
The automation object tells you whether:
  • the provider is supported for direct API automation
  • the account has the required provider connection
  • the current changes are safe to apply
  • manual action or conflict resolution is required first
A provider connection is always resolved from the authenticated TenantCore account. It cannot be supplied or borrowed from another account through this endpoint.

Start automatic provisioning

Queues TenantCore’s persistent DNS provisioning workflow for one owned domain.
Successful requests return 202 Accepted.
Provisioning continues asynchronously through TenantCore’s existing worker. Depending on the current state, the job may move through Microsoft verification, public-DNS propagation, DKIM publication, DKIM enablement, and final health validation. Only one active automatic provisioning job may exist for a domain at a time. Starting another while one is active returns 409 domain_provisioning_already_active.

Get a provisioning run

The run_id must belong to the authenticated TenantCore account. A run from another account is returned as not found. Possible run states include:
  • queued
  • running
  • action_required
  • completed
  • failed
Job responses expose customer-actionable state only. Internal worker leases, account UUIDs, notification IDs, raw provider errors, and internal metadata are not returned by the public API.

List provisioning runs

active_only=true limits the result to queued/running/action-required work. limit may be from 1 to 100.

Retry a provisioning job

After resolving the condition reported by an action_required or waiting job, queue it for another attempt:
The job must belong to a provisioning run owned by the authenticated TenantCore account. TenantCore does not accept a tenant ID, domain name, or provider account in the retry request.

Common errors

See Errors for the common public API error envelope and request IDs.