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

# Create a DNS record

`POST /domains/{domain}/dns/records`

## Request

- Base URL: `https://faivelo.com/api/v1`
- URL: `https://faivelo.com/api/v1/domains/{domain}/dns/records`
- Auth: HTTP bearer

Adds a record to the domain's live zone and returns its provider-assigned `id`. Requires scope `dns:write`.

## Path parameters

- `domain` string, required

## Request body

- CreateDnsRecordRequest
  - `type` 'A' | 'AAAA' | 'CNAME' | 'MX' | 'TXT' | 'SRV' | 'NS' | 'CAA', required
  - `name` string, required: Record name — a full hostname, or `@` for the domain apex
  - `value` string, required
  - `ttl` integer: Time-to-live in seconds (provider default if omitted)
  - `priority` integer: Priority for MX/SRV records

## Response `200`

Record created

- object
  - `success` boolean
  - `data` object
    - `id` string

## Other responses

- `400`: Invalid record, or live DNS editing is not available for this domain
- `401`: Missing or invalid API key
- `402`: The account's plan does not include the API (`plan_required`)
- `403`: The key lacks the required scope
- `404`: Resource not found
- `429`: Rate limit exceeded

---

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