# API: Create new zone

# addDNSZone

Requires DNS Zone editor plugin to be added and active in HostBill. Create new zone. Before creating a DNS zone, we could check to see if one exists first - see "get DNS Zone Details" - to make sure we do not create a zone over the top of one that already exists. Ideally, we should only ever need to complete this action once, per domain.

# Required parameters

Parameter Description
app_id App ID
name Zone name

# Optional parameters

Parameter Description
template_id DNS template ID
ip IP address
client_id Client ID
postaction Zone content, can be import-file, import-axfr, clone or leave empty to add entries manually
axfr_server Nameserver IP, required if postaction = import-axfr
zone_file Standard Zone File, required if postaction = import-file
clone_domain Domain to clone zone content from, required if postaction = clone
replace_record_content Add the parameter to replace record content (i.e. CNAMEs) as well, optional for postaction = clone

# Request

GET /admin/api.php?api_id=API_ID&api_key=API_KEY&call=addDNSZone&app_id=APP_ID&name=NAME

# PHP Samples

# Response

{
    "success": true,
    "zone_id": "3",
    "call": "addDNSZone",
    "server_time": 1622815422,
    "info": [
        "The zone has been created"
    ]
}
Last Updated: 3/31/2025, 2:16:41 PM