Create DNS zone
create_dns_zoneCreate a native or secondary forward DNS zone in your VPSnet account, with optional TSIG for AXFR-backed secondary zones and ownership verification when required.
Instructions
Create a native or secondary forward DNS zone in the authenticated VPSnet account. Secondary zones transfer records from public primary DNS servers and require TSIG. Normally creates pending_verification. With qualifying current ownership proof, the API may instead restore a recently deleted zone and queue immediate publication. Publication can delete stale zone candidates for the same name, including their DNS records and DDNS tokens. Existing live zones are refused; this does not register a domain or change registrar nameservers. Read the returned zone.status and apply_state: queued publication is not proof of live DNS service. When verification is needed, verificationRecord contains the public ownership TXT challenge (_vpsnet-dns.). Follow zone.verification.next_step and warnings for its location, then call verify_dns_zone. Keep nameservers already delegated to VPSnet. A previous-provider or parent-zone location may be required. If the TXT value is missing, first read get_dns_zone.zone.verification.record.value; reissue_dns_zone_verification rotates it only when unrecoverable or requested by the customer. Requires dns:write.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | Zone kind. Defaults to native. Use secondary for AXFR-backed zones. | |
| zone | Yes | Zone name, e.g. example.com | |
| secondary_masters | No | Public primary DNS server IPs for a secondary zone. Non-public IPs are rejected by the API. | |
| secondary_tsig_secret | No | Required for secondary zones. Base64 TSIG secret, 32-64 decoded bytes, e.g. openssl rand -base64 32. It is encrypted and never returned. | |
| secondary_tsig_key_name | No | Required for secondary zones. TSIG key name configured on the primary DNS server. | |
| secondary_tsig_algorithm | No | TSIG algorithm. Defaults to hmac-sha256. |