Skip to content

Knowledgebase

Parse and apply a BIND zone import through the API

domain-nexus, development

Use a BIND import to bring a reviewed record inventory into an existing, owned DNS zone. The API accepts zone text in the request body. It does not open a file path on the WHMCS server or change the domain's registrar nameservers.

Method Resource Scope Idempotency-Key
POST /v2/dns/zones/{zoneId}/imports dns:import Required
GET /v2/dns/imports/{importId} dns:read Not required by this route
POST /v2/dns/imports/{importId}/apply dns:import Required

01 Prepare the source text

Export the source zone, preserve an original copy and review its origin, relative names, TTL values and mail records. Remove unsupported provider instructions only after recording what they did. DNSSEC signatures and provider-specific proxy, routing or traffic settings are not portable ordinary records.

Ensure the target zone exists under the correct account and provider package. Create a fresh backup if it already serves any traffic. Decide whether the import should add to current records or replace their editable set. Replacement can remove website, mail and verification data absent from the source.

02 Parse, review and apply

  1. POST to the zone's imports resource with content containing the complete text, format: "bind" and an explicit wipe choice.
  2. Read the response and retain the import ID. Inspect parser errors, proposed records and conflicts instead of treating an accepted upload as a completed DNS change.
  3. Read the stored import when resuming the workflow. Match its zone and source evidence to the intended change.
  4. POST to /v2/dns/imports/{importId}/apply with the reviewed wipe value. Use a separate idempotency key for this apply action.
  5. Track the resulting work, inspect the complete record list and test important names directly against the destination nameservers.

Common questions

Should I send a backup preview hash with an import?

No. This route applies a stored import with ownership checks; it does not accept the backup restore workflow's preview_hash. Retain your reviewed import and replacement decision in your change record.

Why did imported records not change my live website?

The public delegation may still use the previous DNS provider. First confirm that every intended record exists on the new authority, then plan a separate registrar nameserver change if needed. Also check whether the imported name was relative to the correct zone.

Can I recover from an unwanted replacement?

Stop further edits, compare the before-and-after inventories and use a current preview of the pre-import backup. Reimporting an unreviewed file can make the incident harder to diagnose.

Was this answer helpful?

Need a little more help?

Our support team can help you find the next step.

Contact support