> ## Documentation Index
> Fetch the complete documentation index at: https://developers.aptranet.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Zones

> Create and manage authoritative zones, SOA settings, status, nameservers, and deletion.

A zone is an authoritative namespace such as `example.com`. It belongs to one project and contains SOA settings and record sets.

## Create a zone

```bash theme={null}
curl --request POST \
  --url https://api.aptranet.com/cloud-dns/zones \
  --header "Authorization: Bearer $APTRANET_ACCESS_KEY" \
  --header "Aptranet-Secret: $APTRANET_SECRET" \
  --header "Content-Type: application/json" \
  --data '{
    "name": "example.com",
    "hostmaster_email": "dns-admin@example.com",
    "nx_ttl": 300,
    "refresh": 3600,
    "retry": 600
  }'
```

The hostmaster address becomes SOA RNAME data. The service converts it to DNS wire-format rules where required.

## SOA settings

| Setting | Purpose |
| - | - |
| Hostmaster email | Administrative contact encoded in the SOA record |
| Negative TTL | How long resolvers may cache a negative answer |
| Refresh | How often secondary systems should check for changes |
| Retry | How soon to retry after a failed refresh |

The zone status can be set to `1` (active) or `0` (inactive). An inactive zone should be treated as unavailable for normal serving; use it deliberately and confirm behavior before relying on it for a maintenance plan.

## Nameservers and delegation

Use the nameserver-check endpoint or the console to obtain the project's configured primary and secondary nameservers. The zone's delegation status is separate from its enabled status.

## Delete a zone

Move delegation away first. Wait for old delegation and record TTLs to expire, confirm no production queries depend on the zone, and then delete it.

<Warning>
  Deleting a zone also removes its authoritative record sets from service. This action cannot be reversed through the API.
</Warning>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.