---
title: "Create a DNS record on a domain owned by the caller"
method: POST
path: "/api/client/dns-records"
tags: ["Client - DNS Records"]
---

# Create a DNS record on a domain owned by the caller

`POST /api/client/dns-records`

Type is restricted to A, AAAA, CNAME, MX, TXT, SRV, NS. Provisioning of the zone happens automatically.

## Request body

- object
  - `domain_id` integer, required
  - `name` string, required
  - `type` 'A' | 'AAAA' | 'CNAME' | 'MX' | 'TXT' | 'SRV' | 'NS', required
  - `content` string, required
  - `ttl` integer, required
  - `priority` integer — Required for MX and SRV
  - `weight` integer — Required for SRV
  - `port` integer — Required for SRV

## Response `201`

Created

- DNSRecord — DNS record attached to a domain or hostname
  - `id` integer
  - `dnsable_id` integer — ID of the owning record (domain or hostname)
  - `dnsable_type` 'domain' | 'hostname'
  - `name` string — Record name (use '@' for the zone apex)
  - `type` 'A' | 'AAAA' | 'CNAME' | 'MX' | 'TXT' | 'PTR' | 'SRV' | 'NS' | 'SOA'
  - `content` string — Record content (IP, hostname, TXT value, etc.)
  - `ttl` integer
  - `priority` integer, nullable — Required for MX and SRV
  - `weight` integer, nullable — Required for SRV
  - `port` integer, nullable — Required for SRV
  - `is_manual` boolean
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `404` — Domain not found or not owned by this API key
- `422` — Validation error

---

[API](https://skmtc.dev/adminbolt/apis/adminbolt-api-documentation.md) · [All operations](https://skmtc.dev/adminbolt/apis/adminbolt-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/adminbolt/adminbolt-api-documentation/revisions/bf4f36fbfbd3/schema)
