Skip to main content
Domains are the foundation of your agent’s email identity. A verified domain enables branded email addresses — whether that’s the auto-provisioned system domain ({slug}.usenaive.ai), your own custom domain (agent@acme.com), or a domain purchased directly through the API.

CLI First

Tools

The DNS edit tools are enabled by default. To disable, set AGENT_DNS_EDIT_ENABLED=false on the API — the endpoints will then return 501 feature_not_configured. They also require either DNS_REGISTRAR_TOKEN or DOMAIN_MOCK=true (for local development); without either they return MOCK_MODE_REJECTED.Every DNS edit (success or rejection) appends an activity_log row and emits a domain.updated live event on GET /v1/events.

Domain Types

System Domains

Every company gets a system domain automatically when you register. It follows the pattern {company-slug}.usenaive.ai.
System domains may start with status pending_dns until the email-provider records are verified. This usually resolves automatically, but you can trigger a re-check with the verify endpoint.

Check your system domain

Response:
If status is pending_dns, trigger verification:

Custom Domain Setup (BYOD)

To send emails from your own domain instead of *.usenaive.ai:
1

Connect your domain

Tell Naive about a domain you already own at a registrar (any registrar). If you don’t own a domain yet, use Domain Purchasing instead.
Response:
2

Configure DNS records

Go to your domain registrar’s DNS management panel and add each record from the response:
DNS propagation typically takes 5-30 minutes, but can take up to 48 hours in some cases.
3

Check DNS records status

View per-record verification status:
Response:
4

Verify the domain

Once you’ve added records and waited for propagation, trigger verification:
Response (success):
If verification fails, wait a few more minutes for DNS propagation and try again.
5

Create inboxes and start sending

Once the domain is active, create email addresses and send:
Your agent can now send email from hello@acme.com.

Domain Purchasing

Don’t already own a domain? You can search for availability, check pricing, and purchase one directly through the API. Domains are registered via the domain registrar and payment is handled through checkout.
Each company can purchase up to 3 domains. Purchased domains are automatically configured for email — no manual DNS setup required.

Check availability and price

Response (example — the price is dynamic):
price is not a fixed figure. It is the registrar’s live wholesale quote for that specific domain (TLDs vary widely — a .com and a .ai are not the same price) plus a flat $2 Naïve markup, returned in dollars (price) and cents (priceInCents). The 14.99 above is only an illustrative value; always read the number the API returns. Domain purchases are charged in USD at checkout, not in credits.
If available is false, try a different domain name.

Purchase a domain

Response:
1

Search for a domain

Use GET /v1/domains/search?domain=yourdomain.com to check if the domain is available and see its price.
2

Start purchase

Call POST /v1/domains/purchase with the domain name. This creates a checkout session and returns a checkout_url.
3

Complete payment

Open the checkout_url in a browser to complete payment. The checkout session expires after 30 minutes.
4

Domain registered automatically

After payment, the domain is registered through the domain registrar and DNS is configured automatically. Check status with GET /v1/domains.
The checkout URL expires. If payment is not completed, the domain reservation is released and you’ll need to call POST /v1/domains/purchase again.

Agent DNS Editing

Once a domain is connected (custom or purchased) and the zone is delegated to the managed DNS, agents can read and modify the DNS records directly. This is a separate surface from the verification workflow above:

List every record in the zone

Create or replace a record

The default mode is replace: if a single matching record exists at the same (type, name) it is PATCHed in place; if multiple exist, the new authoritative record is added then the old ones are best-effort deleted; if none exist, a new record is added. Set mode: "append" to always create a new row instead.

Delete a record

Safety rules

These rules are enforced by the API and surface via error.reason codes:

Allowed CAs

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

Ownership marker

Records written by Naive carry a comment like naive:owned;company=<id>;agent=<id>;ts=<unix>. The legacy paperclip:owned prefix is also recognized for cross-product compatibility on a shared customer zone. To overwrite or delete a record without this marker (e.g. legacy records left at the registrar) pass acknowledge_unowned: true in the body or query string. The response’s ownership field will be naive for clean writes and unowned-acknowledged when the agent overrode an unowned record.

Apex A/AAAA flips app_connect_status

When a write creates or replaces an apex A or AAAA record (name is empty, @, or the zone domain), the API atomically transitions the domain’s app_connect_status to agent_managed_pending, writes to the managed DNS, and on success commits to agent_managed. On a managed DNS failure it rolls back to the previous status. Reapers and connect sweeps in either Naive product (this SDK or naive-paperclip) skip agent_managed/agent_managed_pending rows so the agent’s record won’t be reverted. Listen for the apex flip on the live event stream (GET /v1/events) — domain.updated events with payload.action = "agent_managed" fire on commit.

Audit log + live events

Every DNS edit (success or rejection) appends a row to activity_log with one of these actions: dns.record.set, dns.record.delete, dns.record.rejected. The same event also fans out on the company SSE stream:
Currently emitted: domain.updated and activity.logged.

Mock mode

If DNS_REGISTRAR_TOKEN is unset and DOMAIN_MOCK=true, all writes are simulated against an in-memory store and responses include mock: true. Useful for local development and CI; the operation does not touch real DNS.

Why Custom Domains Matter

Error Handling

Typical Workflows (Agent Perspective)

Purchasing a new domain

Connecting an existing domain (BYOD)