---
title: "Replace the registrar DNS records."
method: PUT
path: "/v1/domain-purchases/{id}/dns"
tags: ["Domain purchases"]
---

# Replace the registrar DNS records.

`PUT /v1/domain-purchases/{id}/dns`

## Request

- Base URL: `https://api.domainee.dev`
- URL: `https://api.domainee.dev/v1/domain-purchases/{id}/dns`
- Auth: HTTP bearer

Declarative: the set you send becomes the complete record set. Omitting a record deletes it.

## Request body

- object
  - `records` RegistrarDnsRecord[], required
    - `type` 'A' | 'AAAA' | 'CNAME' | 'MX' | 'TXT' | 'NS' | 'SRV' | 'URL' | 'URL301' | 'FRAME', required
    - `name` string, required: Subdomain label; `@` for the apex.
    - `value` string, required
    - `ttl` integer
    - `priority` integer: MX/SRV only.

## Response `200`

The records currently held at the registrar.

- object
  - `hostname` string, required
  - `records` RegistrarDnsRecord[], required
    - `type` 'A' | 'AAAA' | 'CNAME' | 'MX' | 'TXT' | 'NS' | 'SRV' | 'URL' | 'URL301' | 'FRAME', required
    - `name` string, required: Subdomain label; `@` for the apex.
    - `value` string, required
    - `ttl` integer
    - `priority` integer: MX/SRV only.

## Other responses

- `400`: The request body or query failed validation.
- `401`: Missing, malformed, revoked, or expired Bearer token.
- `404`: No such object in this workspace.

---

[API](https://skmtc.dev/domainee/apis/domainee-api.md) · [All operations](https://skmtc.dev/domainee/apis/domainee-api/llms.txt) · [OpenAPI document](https://skmtc.dev/domainee/apis/domainee-api/revisions/756d54434372?raw)
