DNS

Restore DNS from a snapshot

Applies DNS records from a snapshot to the domain's current registrar. Uses a diff algorithm to avoid duplicating records that already exist. If no snapshot is provided in the body, restores from the server-side backup (created by snapshot or transfer).

Mail routing: a change to where the domain's mail is delivered (its MX or NS records, the address records an MX host inside the zone resolves through, or those of a host that receives Domani mail and publishes no MX) needs the email:auth_secrets scope, since whoever receives the mail receives its sign-in codes. Without it the request answers 403 INSUFFICIENT_SCOPE before anything changes, and a token confined to mailboxes answers 403 MAILBOX_CONFINED even with it. Other records need only domains:write. Every routing change is recorded in the audit log.

post/api/domains/{domain}/dns/restore

Request

  • Base URL: https://domani.run
  • URL: https://domani.run/api/domains/{domain}/dns/restore
  • Auth: HTTP bearer

Path parameters

domainstring required
Example:mysite.com

Domain name you own

Request body

dry_runboolean

Preview only: returns what the restore would create (would_apply) and skip, without writing anything.

Example request

{
  "snapshot": {
    "records": [
      {
        "name": "@",
        "value": "76.76.21.21",
        "ttl": 3600
      }
    ]
  }
}

Response

DNS restored from snapshot

domainstring
appliedinteger

Number of records created

skippedinteger

Number of records already present

recordCountinteger

Total records in the snapshot

errorsstring[]
dry_runboolean

True when this was a preview - nothing was written

Example response

{
  "would_apply": [
    {
      "name": "@",
      "value": "76.76.21.21",
      "ttl": 3600
    }
  ]
}

Changes

No recorded changes to this operation across all 2 revisions of this API.