API overview
Read which agents visit your sites and what they pay, and manage your DNS records, from a script or an AI agent.
The DNA API gives a script the figures your dashboard shows and the DNS records it manages. A weekly report can pull the agents that visited and what they paid; a deploy script can point a new subdomain at a server.
https://api.d3.com/v1The API is for servers, scripts and AI agents, not web pages: it sends no CORS headers. The OpenAPI document describes every endpoint and needs no key.
Quickstart
-
Create a key with access. You need to be an owner or admin of the organization.
-
Check what the key can do:
curl https://api.d3.com/v1/me \ -H "Authorization: Bearer $DNA_API_KEY" -
Read usage or earnings, or change a DNS record on a domain connected to DNA's nameservers.
Endpoints
Usage
Which agents visit your sites, why they come, and which pages they read.
Earnings
What agents paid on your priced pages.
Domains
Your domains on DNA's nameservers.
Records
Read and change a domain's DNS records.
Pagination
Lists of domains and records return one page at a time:
{ "data": [ … ], "page": 1, "per_page": 100, "total_count": 2, "total_pages": 1 }per_page is 100 by default and at most 1000. While page is less than total_pages, request the
next one.
In the dashboard
- Connect and remove domains: Connect a domain.
- Create keys and change their access: the API keys page.