---
title: "Update a DNS record"
method: PUT
path: "/domains/{domain}/dns/records/{id}"
tags: ["DNS"]
---

# Update a DNS record

`PUT /domains/{domain}/dns/records/{id}`

## Request

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

Replaces a record in place (all fields required — fetch the current values first). Records flagged `mailCritical` are refused with **409** unless `force: true` is passed, because changing them can break the domain's email. Requires scope `dns:write`.

## Path parameters

- `domain` string, required
- `id` string, required

## Request body

- UpdateDnsRecordRequest
  - `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
  - `priority` integer: Priority for MX/SRV records
  - `force` boolean: Confirm editing a mail-critical record

## Response `200`

Record updated

- object
  - `success` boolean
  - `data` object
    - `ok` boolean

## 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
- `409`: The record is mail-critical — repeat the request with `force: true` to confirm
- `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)
