Get your free beta license ↗
API operation · dns group
DELETE

/dns/zones/{name}

First published 3 Oct 20260.1.0Unchanged since publication

Delete a server-owned zone or a DNS client's zone

Who may call it
AdministratorResellerCustomer
Token scope, any of
dnsall
Answers200 OK

Deletes a kept zone, an automatic zone for the web interface hostname or a nameserver, or a zone held for a DNS distribution client. Deletion removes all of the zone's records. This operation refuses zones belonging to a domain or alias. A domain's zone is deleted with the domain.

UrbeStack records the name of a deleted automatic or kept zone in dns.server_zones_removed if it matches an automatic zone name for the web interface hostname or a nameserver. Restore the zone by name with POST /dns/zones or urbestack-dns-zone-add. If the server hosts an enclosing zone, UrbeStack publishes the web interface hostname's IP address and mail records, or the nameserver's IP address records, in the enclosing zone. The response reports the deletion and publication results.

As a command

Run as root on the server

Parameters

namepath ·DomainNameRequired

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X DELETE "$API/dns/zones/example.com" \
  -H "Authorization: Bearer $TOKEN"
Response · 200 OK
{
  "client": {
    "address": "info@example.com",
    "label": "my laptop"
  },
  "deleted": true,
  "published": true,
  "reload": "text",
  "stays_deleted": true,
  "zone": "text"
}

Errors

7 errors, each a status and a sentence
400--name is required
400Domain name required
400Domain name too long
400Invalid domain name
400Zone <z.name> belongs to
401Authentication required
404Zone '<name>' not found
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.1.0 on 3 Oct 2026.
urbestack.com/docs/api/delete-dns-zones-name/