# DNA Rest API

> Register and manage domain names, contacts, DNS, SSL certificates and hosting from your own system. JSON over HTTPS; any HTTP client will do.

Everything in this guide, your AI agent can read too: Claude Code, Cursor, Codex, ChatGPT, Claude. [See how](#your-ai-agent-can-build-the-integration).

## At a glance

- **Base URL:** `https://api.domainresellerapi.com/api/v1/`
- **Authentication:** the `X-API-KEY` and `__reseller` headers on every request — see [Authentication](https://www.domainnameapi.com/docs/getting-started/authentication/).
- **Format:** JSON over HTTPS. There is no SDK to install.
- **Test environment:** `https://ote.domainresellerapi.com` with your separate test API key; registry operations are simulated and your balance is not charged.

## Your first request

Check whether a domain is available. Replace the two header values with the API key and reseller ID from your reseller panel.

```bash
curl -X POST https://api.domainresellerapi.com/api/v1/domains/search \
  -H 'X-API-KEY: YOUR_API_KEY' \
  -H '__reseller: YOUR_RESELLER_ID' \
  -H 'Content-Type: application/json' \
  -d '{"domainName":"apiname.com"}'
```

Then read [Before you write any code](https://www.domainnameapi.com/docs/getting-started/#before-you-write-any-code): four decisions that prevent most integration bugs.

## Find what you need
- [Contacts](https://www.domainnameapi.com/docs/contacts/): The four contact roles, reusable handle codes, and the e-mail verification that can suspend a domain.
- [Domains](https://www.domainnameapi.com/docs/domains/): Check availability, register, renew, transfer, and manage a domain afterwards.
- [Name servers & DNSSEC](https://www.domainnameapi.com/docs/name-servers/): Which name servers answer for a domain, host (glue) records, and DS records.
- [DNS records](https://www.domainnameapi.com/docs/dns-records/): Add, change and remove A, MX, TXT, CNAME and other records on our name servers.
- [SSL certificates](https://www.domainnameapi.com/docs/ssl/): Generate a CSR, buy, configure, poll for issuance and download — in that order.
- [Hosting](https://www.domainnameapi.com/docs/hosting/): Buy and provision shared hosting accounts; creation is asynchronous.
- [Catalogue & billing](https://www.domainnameapi.com/docs/catalogue/): What you can sell and at what price, your orders, and your balance.
- [Error codes](https://www.domainnameapi.com/docs/reference/errors/): Every error code with what it means and what to do — and which ones never to retry.
## Your AI agent can build the integration

Every page of this guide is also plain Markdown, written so a coding agent can follow it as well as you can. Your agent reads the rules, then writes the code that calls the API with your key.

| Agent | Does | Reads |
| --- | --- | --- |
| Claude Code | reads the whole guide before it writes a line | [`/llms-full.txt`](https://www.domainnameapi.com/docs/llms-full.txt) |
| Cursor | writes your registration flow, extra registry fields included | [`/domains/register.md`](https://www.domainnameapi.com/docs/domains/register.md) |
| Codex | fills in the `tldAttributes` .com.tr asks for | [`/tlds/com.tr.md`](https://www.domainnameapi.com/docs/tlds/com.tr.md) |
| ChatGPT | explains an error code and what to do about it | [`/reference/errors.md`](https://www.domainnameapi.com/docs/reference/errors.md) |
| Claude | checks your renewal logic against the rules | [`/domains/renew.md`](https://www.domainnameapi.com/docs/domains/renew.md) |

### Give the guide to your agent

**Claude Code** — Add this line to `CLAUDE.md` in your project:

```md
Before working on our DNA Rest API integration, read https://www.domainnameapi.com/docs/llms.txt and fetch the pages it lists that you need.
```

**Codex** — Add this line to `AGENTS.md` in your project:

```md
Before working on our DNA Rest API integration, read https://www.domainnameapi.com/docs/llms.txt and fetch the pages it lists that you need.
```

**Cursor** — Add this line to `AGENTS.md` in your project. Cursor reads it in every chat:

```md
Before working on our DNA Rest API integration, read https://www.domainnameapi.com/docs/llms.txt and fetch the pages it lists that you need.
```

**ChatGPT & Claude** — Every page has **Open in ChatGPT** and **Open in Claude** under its title. To give a chat the whole guide, paste this link:

```text
https://www.domainnameapi.com/docs/llms-full.txt
```

### Questions

#### Can my agent call the API for me?

Not from this guide alone. It reads the rules and writes code that calls the API with your API key. Run that code against the [test environment](https://www.domainnameapi.com/docs/getting-started/#test-environment) first: registry operations there are simulated and your balance is not charged.

#### Does my agent need an API key to read the guide?

No. Every page, [`/llms.txt`](https://www.domainnameapi.com/docs/llms.txt) and [`/llms-full.txt`](https://www.domainnameapi.com/docs/llms-full.txt) are public.

#### Which file should it read first?

[`/llms.txt`](https://www.domainnameapi.com/docs/llms.txt): one line per page, so the agent fetches only what it needs. Every page is also Markdown at its own address plus `.md`, for example [`/domains/register.md`](https://www.domainnameapi.com/docs/domains/register.md). If your agent can take a large file in one go, [`/llms-full.txt`](https://www.domainnameapi.com/docs/llms-full.txt) is the whole guide, about 300 KB.

#### How current is it?

The Markdown is built from the same source as these pages, so they never disagree. The TLD pages come from the catalogue on the date shown at the bottom of each one; in your code, read live values from `GET /api/v1/products/tlds`.

## Support

Open a ticket from your reseller panel. Include your `X-Correlation-ID` and, for paid operations, the `traceId` from your transaction list.
