# POST /dns/zones/{name}/reset

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

UrbeStack release 0.2.35 API operation in the dns group.

Reset a DNS zone

- Who may call it: administrator
- Token scope, any of: dns, all
- Answers: 200 OK

UrbeStack replaces the zone's records with records from the zone template, excluding records for subdomains and delegations to other zones from the reset. A server zone has no template and retains only the server's records.

The 200 response includes the zone, the numbers of records removed and restored, the records, and the publication outcome.

## As a command

- [urbestack-dns-zone-reset](https://urbestack.com/docs/commands/urbestack-dns-zone-reset.md): Resets a DNS zone by replacing its own records with records from the zone template.

## Parameters

- `name` (path, DomainName, required)

## 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/example.com/reset" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "published": true,
  "records": [
    {
      "content": "text",
      "created_at": "2026-09-09T10:15:00Z",
      "id": 1,
      "managed_key": "text",
      "name": "alice",
      "origin": "yours",
      "priority": 1,
      "server": true,
      "system": true,
      "ttl": 1,
      "type": "A"
    }
  ],
  "reload": "text",
  "removed": 1,
  "restored": 1,
  "zone": "text"
}
```

## Errors

- 400: --zone is required
- 400: Domain name required
- 400: Domain name too long
- 400: Invalid domain name
- 401: Authentication required
- 404: Zone '<name>' not found
