---
title: "Create DNS record"
method: POST
path: "/domains/{domain}/dns"
---

# Create DNS record

`POST /domains/{domain}/dns`

## Request

- Base URL: `https://namemy.app/api/v1`
- URL: `https://namemy.app/api/v1/domains/{domain}/dns`
- Auth: HTTP bearer

## Request body

- DnsRecordInput
  - `type` 'A' | 'AAAA' | 'CNAME' | 'MX' | 'TXT' | 'NS' | 'SRV' | 'CAA', required
  - `host` string, required
  - `value` string, required
  - `ttl` integer
  - `priority` integer

## Response `200`

Record created

- DnsRecord
  - `id` string
  - `type` 'A' | 'AAAA' | 'CNAME' | 'MX' | 'TXT' | 'NS' | 'SRV' | 'CAA'
  - `host` string
  - `value` string
  - `ttl` integer
  - `priority` integer, nullable

## Other responses

- `400`: Invalid request parameters
- `401`: Missing or invalid API key
- `403`: Valid key but missing required permission
- `404`: Resource not found
- `429`: Rate limit or daily quota exceeded

---

[API](https://skmtc.dev/namemy/apis/namemy-app-api.md) · [All operations](https://skmtc.dev/namemy/apis/namemy-app-api/llms.txt) · [OpenAPI document](https://skmtc.dev/namemy/apis/namemy-app-api/revisions/1c302ede4b63?raw)
