# Zone Create
## Endpoint
`/api/zones/create`
## Method
GET or POST (POST required when importing a zone file via multipart form data)
## Description
Creates a new authoritative zone. Supports creating Primary, Secondary, Stub, Forwarder, SecondaryForwarder, Catalog, and SecondaryCatalog zones. Can optionally import a zone file during creation for Primary or Forwarder zones via POST with multipart form data.
## Authentication
Token required.
## Parameters
| `token` | string | Yes | - | Session token from `login` or `createToken`. |
| `node` | string | No | - | Node domain name for clustering. When unspecified, the current node is used. Only usable when Clustering is initialized. |
| `zone` | string | Yes | - | Domain name for the new zone. Can be a valid domain name, IP address, or network address in CIDR format. IP/CIDR values create a reverse zone. |
| `type` | string | Yes | - | Zone type. Valid values: [`Primary`, `Secondary`, `Stub`, `Forwarder`, `SecondaryForwarder`, `Catalog`, `SecondaryCatalog`]. |
| `catalog` | string | No | - | Name of the catalog zone to become its member. Valid only for `Primary`, `Secondary`, `Stub`, and `Forwarder` zones. |
| `useSoaSerialDateScheme` | boolean | No | - | Enable date scheme for SOA serial. Only used with `Primary`, `Forwarder`, and `Catalog` zones. Default: `false`. |
| `primaryNameServerAddresses` | string | No | Required for `SecondaryForwarder` and `SecondaryCatalog` | Comma-separated list of IP addresses or domain names of primary name server. Used with `Secondary`, `SecondaryForwarder`, `SecondaryCatalog`, and `Stub` zones. Auto-resolved for `Secondary` and `Stub` if omitted. **Required** for `SecondaryForwarder` and `SecondaryCatalog`. |
| `zoneTransferProtocol` | string | No | - | Zone transfer protocol for `Secondary`, `SecondaryForwarder`, and `SecondaryCatalog` zones. Valid values: [`Tcp`, `Tls`, `Quic`]. |
| `tsigKeyName` | string | No | - | TSIG key name for `Secondary`, `SecondaryForwarder`, and `SecondaryCatalog` zones. |
| `validateZone` | boolean | No | - | Enable ZONEMD validation for `Secondary` zones. Zone gets disabled if validation fails. Zone must be DNSSEC signed. Only valid for `Secondary` zones. |
| `initializeForwarder` | boolean | No | - | Initialize the Conditional Forwarder zone with an FWD record (`true`) or create empty (`false`). Default: `true`. Only for `Forwarder` zones. |
| `protocol` | string | No | Requires `initializeForwarder=true` | DNS transport protocol for the Conditional Forwarder. Valid values: [`Udp`, `Tcp`, `Tls`, `Https`, `Quic`]. Default: `Udp`. Only for `Forwarder` zones. |
| `forwarder` | string | No | Requires `initializeForwarder=true` | Address of the DNS server to use as a forwarder. Special value `this-server` forwards internally. Only for `Forwarder` zones. |
| `dnssecValidation` | boolean | No | Requires `initializeForwarder=true` | Whether DNSSEC validation must be done. Only for `Forwarder` zones. |
| `proxyType` | string | No | Requires `initializeForwarder=true` | Proxy type for conditional forwarding. Valid values: [`NoProxy`, `DefaultProxy`, `Http`, `Socks5`]. Default: `DefaultProxy`. Only for `Forwarder` zones. |
| `proxyAddress` | string | No | Requires `initializeForwarder=true` and `proxyType` configured | Proxy server address. Only for `Forwarder` zones. |
| `proxyPort` | integer | No | Requires `initializeForwarder=true` and `proxyType` configured | Proxy server port. Only for `Forwarder` zones. |
| `proxyUsername` | string | No | Requires `initializeForwarder=true` and `proxyType` configured | Proxy server username. Only for `Forwarder` zones. |
| `proxyPassword` | string | No | Requires `initializeForwarder=true` and `proxyType` configured | Proxy server password. Only for `Forwarder` zones. |
## Response Fields
| `response.domain` | string | The zone that was created. Useful for determining the reverse zone name that was generated. |
## Conditional Logic Notes
- **`primaryNameServerAddresses`**: Optional for `Secondary` and `Stub` (auto-resolved), but **required** for `SecondaryForwarder` and `SecondaryCatalog`.
- **Forwarder-specific parameters** (`protocol`, `forwarder`, `dnssecValidation`, `proxyType`, `proxyAddress`, `proxyPort`, `proxyUsername`, `proxyPassword`): All require `initializeForwarder=true` to take effect. They are only applicable to `Forwarder` type zones.
- **`zoneTransferProtocol`** and **`tsigKeyName`**: Only applicable to `Secondary`, `SecondaryForwarder`, and `SecondaryCatalog` zones.
- **`validateZone`**: Only valid for `Secondary` zones. The zone must be DNSSEC signed for validation to work.
- **`useSoaSerialDateScheme`**: Only used with `Primary`, `Forwarder`, and `Catalog` zones.
- **`catalog`**: Only valid for `Primary`, `Secondary`, `Stub`, and `Forwarder` zones.
- When `zone` is an IP address or CIDR network, a reverse zone is automatically created.
## Edge Cases
- When importing a zone file during creation, use POST with multipart form data. This is only supported for `Primary` and `Forwarder` zones.
- The `forwarder` parameter accepts a special value `this-server` which forwards requests internally to the DNS server itself, allowing zone record overrides with the rest resolved via "This Server".
- The response `domain` field is especially important when creating reverse zones from IP/CIDR input, as the actual zone name will differ from the input.
## Obsolete Paths
- `/api/zone/create`
- `/api/createZone`