Skip to main content
string
required
Domain UUID
string
required
One of A, AAAA, CNAME, MX, TXT, CAA
string
required
Record value: IPv4 (A), IPv6 (AAAA), hostname (CNAME/MX), TXT string, or CAA value (0 issue "letsencrypt.org")
string
Record name. Use @ or omit for the zone apex. e.g. www for www.acme.com.
integer
TTL in seconds. Must be 60-86400.
integer
MX priority (required for MX). Must be 0-65535.
string
replace (default) PATCHes a single matching record at the same (type, name), or add-then-deletes when multiple match. append always creates a new row.
boolean
Required to overwrite an existing record that wasn’t created by Naive. Defaults to false.

Apex A/AAAA writes flip app_connect_status

When the request creates or replaces an apex A or AAAA record (i.e. name is empty, @, or the zone domain itself), the API atomically transitions the domain’s app_connect_status:
  1. Pre-flip to agent_managed_pending and clear connected_app_id.
  2. Write to the DNS zone.
  3. On success → flip to agent_managed and emit a domain.updated event with payload.action = "agent_managed" on the live event stream.
  4. On failure → roll back to the previous app_connect_status (best-effort).
After this, reapers and connect sweeps in either Naive product (SDK or paperclip on a shared DB) skip this domain. To re-enable Naive app routing, the user must explicitly disconnect and reconnect the domain from the dashboard; the agent cannot reverse this automatically.

Replace Semantics

When mode is replace (the default) and type is not CAA: CAA records always use add (multiple CAA rows at the same name are semantically valid).

Ownership

Records written by this endpoint carry a comment like naive:owned;company=<id>;agent=<id>;ts=<unix>. To overwrite a record that wasn’t created by Naive (e.g. legacy records left at the registrar), pass acknowledge_unowned: true. The response’s ownership field will be unowned-acknowledged in that case.

Validation Rules

The API enforces strict validation. Each rule maps to a reason code in the error response:

Allowed CAs

ssl.com, letsencrypt.org, digicert.com, sectigo.com, globalsign.com, amazon.com, pki.goog, google.com.

Errors