1. Zone
mijn.host API
  • Getting started
    • Introduction
    • Base url
    • Authentication
    • Response codes
  • Domains
    • Domains
      • DNS
        • Zone
          • Get DNS zonefile
            GET
          • Import DNS zonefile
            PUT
        • Get DNS records
          GET
        • Update DNS records
          PUT
        • Update single DNS record
          PATCH
        • Delete single DNS record
          DELETE
      • List domains
        GET
      • Get domain
        GET
      • Update domain
        PUT
      • Cancel domain
        DELETE
      • Cancel domain deletion
        PUT
      • Get auth code
        GET
    • Contacts
      • List profiles
      • Get profile
      • Create profile
      • Update profile
      • Delete profile
      • Get profile
      • Update profile
    • Nameservers
      • List profiles
      • Get profile
      • Create profile
      • Update profile
      • Delete profile
    • DNS templates
      • List templates
      • Get template
      • Create template
      • Update template
      • Delete template
    • Availability
      • Check domain availability
    • Order
      • Order domain
    • Extensions
      • List domain extensions
      • Get domain extension
  • Virtual Private Servers
    • Backups
      • List backups
      • Create backup
      • Restore backup
    • List VPS instances
      GET
    • VPS details
      GET
    • Update VPS
      PUT
    • Restart VPS
      POST
    • Enable or disable rescue mode
      PUT
    • Cancel VPS
      DELETE
    • Cancel VPS deletion
      PUT
    • List available OS images
      GET
    • Reinstall VPS
      POST
    • Start VPS
      POST
    • Stop VPS
      POST
    • Power off VPS
      POST
    • Reset VPS root password
      POST
    • Change VPS hostname
      PUT
  • Certificates
    • List certificates
    • Get certificate
    • List certificate packages
    • Order certificate
    • Generate CSR
    • Request certificate
  • Orders
    • List orders
    • Get order
    • Update order
  • Affiliate
    • Commissions
      • List affiliate commissions
      • Get affiliate commission
    • Payments
      • List affiliate payments
      • Get affiliate payment
  • Account
    • Profile
      • Get account profile
      • Update account profile
    • Payment methods
      • List payment methods
      • Update default payment method
    • Invoices
      • List invoices
      • Get invoice
      • Download invoice PDF
    • Users
      • List account users
      • Get account user
      • Create account user
      • Update account user
    • Tickets
      • List support tickets
      • Get support ticket
      • Create support ticket
      • Reply to support ticket
  • Tools
    • Get your IP and customer number
  1. Zone

Import DNS zonefile

PUT
/domains/{domain}/dns/zone
Replace all DNS records of a specific domain with the contents of a BIND style zonefile. Every record currently in the zone is removed, so the zonefile must contain the complete desired state. Send JSON { "zone": "<zonefile>" } with Content-Type: application/json. Encode the request body as JSON so the zonefile's newlines and tabs become \n and \t inside that string; a JSON library does this automatically — do not send the zonefile as the raw HTTP body and do not encode the zonefile twice. Lines are read as name ttl IN type rdata; blank lines, comments, directives such as $TTL and lines that do not have all five fields are ignored. SOA and apex NS records in the body are ignored: the apex NS records of the existing zone are kept. When the zonefile is rejected, the previous records are restored. Not available for domains whose DNS is managed through Cloudflare.

Request

Authorization
Add parameter in header
API-Key
Example:
API-Key: ********************
Path Params

Header Params

Body Params application/json

Example
{
    "zone": "domain.com.\t900\tIN\tA\t135.226.123.12\nwww.domain.com.\t900\tIN\tCNAME\tdomain.com.\ndomain.com.\t900\tIN\tMX\t10 mail.domain.com.\ndomain.com.\t900\tIN\tTXT\t\"v=spf1 include:spf.mijn.host ~all\"\n"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://mijn.host/api/v2/domains/domain.com/dns/zone' \
--header 'Accept: application/json' \
--header 'User-Agent: my-application/1.0.0' \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
    "zone": "domain.com.\t900\tIN\tA\t135.226.123.12\nwww.domain.com.\t900\tIN\tCNAME\tdomain.com.\ndomain.com.\t900\tIN\tMX\t10 mail.domain.com.\ndomain.com.\t900\tIN\tTXT\t\"v=spf1 include:spf.mijn.host ~all\"\n"
}'

Responses

🟢200OK
application/json
Bodyapplication/json

Example
{
    "status": 0,
    "status_description": "string"
}
🟠400No zone provided. Use the "zone" string to pass a zonefile.
🟠400Zone import is not available for Cloudflare-managed domains.
🟠400Wrong request method
🟠400SSL connection is required
🟠400No domain set
🟠400You have no access to this resource.
🟠401No valid API key set
🟠401API key has expired
🟠401Remote IP address is not found in the API key whitelist
🔴500Error
Modified at 2026-08-18 11:51:27
Previous
Get DNS zonefile
Next
Get DNS records
Built with