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

First published 16 Oct 2026 (release 0.2.6) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the dns group.

Take over a DNS record set generated by UrbeStack

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

A record set contains all records with the same name and type in a zone. Eligible sets include apex NS records, nameserver glue, and the IP address and mail records for the server's hostname. Use a name relative to the zone, or @ for the apex.

After takeover, UrbeStack stops generating the set or updating it from server settings. The records have system set to true, and only an administrator can change them. An administrator who edits or successfully deletes a server-generated record also takes over its entire set.

The 201 response includes the zone, name, type, records in the set, and publication outcome. If the administrator already controls the set, the response includes its existing records with taken set to false.

## As a command

- [urbestack-dns-take](https://urbestack.com/docs/commands/urbestack-dns-take.md): Transfers control of a DNS record set that UrbeStack generates to the administrator.

## Parameters

- `name` (path, DomainName, required)

## Request body

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

- `name` (string, up to 200 characters, required): Name relative to the zone, with @ representing the zone itself.
- `type` (string, one of A, AAAA, CNAME, MX, TXT, SRV, CAA, NS, 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/taken" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "alice",
    "type": "A"
  }'
```

Response, 201 Created:

```
{
  "name": "alice",
  "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",
  "taken": true,
  "type": "rebuild",
  "zone": "text"
}
```

## Errors

- 400: --<o> is required
- 400: Domain name required
- 400: Domain name too long
- 400: Invalid domain name
- 400: Invalid record name
- 400: Record name required
- 400: Record name too long
- 400: Record type must be one of 
- 400: The panel writes no <type> record at <name> in <zone.name>; it is yours already
- 401: Authentication required
- 404: The <type> records at <name> in <zone.name> are not taken over; the panel writes them already
- 404: Zone '<name>' not found
