---
title: "Create DNS domain record"
method: POST
path: "/dns-domain/{domain-id}/record"
tags: ["record"]
---

# Create DNS domain record

`POST /dns-domain/{domain-id}/record`

## Request

- Base URL: `https://api-ch-gva-2.exoscale.com/v2`
- URL: `https://api-ch-gva-2.exoscale.com/v2/dns-domain/{domain-id}/record`
- Auth: none declared
- TypeScript: <https://skmtc.dev/exoscale/apis/exoscale-api/docs/dns-domain/:domain-id/record/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `domain-id` string, uuid, required

## Request body

- object
  - `name` string, required: DNS domain record name
  - `type` 'NS' | 'CAA' | 'NAPTR' | 'POOL' | 'A' | 'HINFO' | 'CNAME' | 'SSHFP' | 'SRV' | 'AAAA' | 'MX' | 'TXT' | 'ALIAS' | 'URL', required: DNS domain record type
  - `content` string, required: DNS domain record content
  - `ttl` integer: DNS domain record TTL
  - `priority` integer: DNS domain record priority

## Response `200`

200

- Operation: Operation
  - `id` string, uuid: Operation ID
  - `reason` 'incorrect' | 'unknown' | 'unavailable' | 'forbidden' | 'busy' | 'fault' | 'partial' | 'not-found' | 'interrupted' | 'unsupported' | 'conflict': Operation failure reason
  - `reference` object: Related resource reference
    - `id` string, uuid: Reference ID
    - `link` string: Link to the referenced resource
    - `command` string: Command name
  - `message` string: Operation message
  - `state` 'failure' | 'pending' | 'success' | 'timeout': Operation status

## Changes

- **2026-03-16** `e05707a7b346`: 2 info
  - api tag `record` added
  - api tag `dns` removed
- **2025-11-14** `352cae63dff6`: 1 breaking
  - removed the enum value `SPF` of the request property `type`
- **2023-12-08** `ec6a2a6bc1c1`: 4 breaking
  - removed the enum value `DNSKEY` of the request property `type`
  - removed the enum value `DS` of the request property `type`
  - removed the enum value `PTR` of the request property `type`
  - removed the enum value `SOA` of the request property `type`
- **2023-02-03** `6e9809fd1444`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/exoscale/apis/exoscale-api/changes/dns-domain/:domain-id/record/post.md)

---

[API](https://skmtc.dev/exoscale/apis/exoscale-api.md) - [All operations](https://skmtc.dev/exoscale/apis/exoscale-api/llms.txt) - [OpenAPI document](https://skmtc.dev/exoscale/apis/exoscale-api/revisions/63da6f74c845?raw)
