# POST /dns/zones

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the dns group.

Create a kept DNS zone

- Who may call it: administrator
- Token scope, any of: dns, all
- Answers: 201 Created

Creates a zone for the administrator to manage independently of any domain or alias. A new zone starts with the server's SOA record, NS record set and glue records. Use --system with the record commands to manage records in the zone.

If name matches an existing automatic zone for the web interface hostname or a nameserver, UrbeStack converts it to a kept zone so it survives changes to the hostname or nameservers. If that automatic zone was previously deleted, UrbeStack restores it as an automatic zone. The response gives the zone name, the creation, conversion and restoration flags, and the publication result.

## As a command

- [urbestack-dns-zone-add](https://urbestack.com/docs/commands/urbestack-dns-zone-add.md): Creates a server-owned DNS zone for the administrator to manage independently of a domain or alias.

## Request body

JSON, the type [DnsZoneCreate](https://urbestack.com/docs/api/types/DnsZoneCreate.md).

- `name` (DomainName, required): A domain name is case-insensitive and stored in lowercase.

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X POST "$API/dns/zones" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "example.com"
  }'
```

Response, 201 Created:

```
{
  "created": true,
  "kept": true,
  "published": true,
  "reload": "text",
  "restored": true,
  "zone": "text"
}
```

## Errors

- 400: --name is required
- 400: Domain name required
- 400: Domain name too long
- 400: Invalid domain name
- 401: Authentication required
- 409: <name> is a hosted name; its zone comes with it
- 409: Zone <name> exists already
- 409: Zone <name> exists already: it belongs to 
