# Testing with LLMs (https://developer.godaddy.com/en/docs/api-users/testing-with-llms)

***

title: Testing with LLMs
description: Validate GoDaddy API integrations with coding agents using machine-readable docs, OpenAPI, and MCP.
agentNotes:
permissions: \["Any account"]
scopes: \["domains.domain:read"]
idempotent: true
destructive: false
failureRecovery: "Read-only evaluation path. Prefer OTE for any write tests. Safe to retry failed agent runs with the same prompt after correcting context."
related:
guides:

* title: "Quickstart"
  href: "/docs/api-users/quickstart"
* title: "End-to-end workflow"
  href: "/docs/api-users/full-workflow"
* title: "MCP server"
  href: "/docs/api-users/mcp"
  concepts:
* title: "Authentication"
  href: "/docs/api-users/auth"
* title: "Error handling"
  href: "/docs/api-users/errors"
  apis:
* title: "Domains v3 OpenAPI"
  href: "/openapi/domains-v3.json"

***

## Overview

Coding agents (Cursor, Claude, Copilot, Windsurf, and similar) work best when they can fetch **plain-text docs**, a **curated index**, and the **OpenAPI contract**.

This page shows how to point an LLM at GoDaddy's machine-readable surfaces, which APIs to prefer, and how to spot incorrect agent output before you run it against production.

## Machine-readable resources

Use these URLs as agent context. Append `.md` to any docs page for Markdown (lower token cost than HTML).

| Resource                      | URL pattern                           | Use when                                   |
| ----------------------------- | ------------------------------------- | ------------------------------------------ |
| Curated index (`llms.txt`)    | `/llms.txt`                           | Agent needs a starting map of the docs     |
| Bulk export (`llms-full.txt`) | `/llms-full.txt`                      | Agent needs the full corpus in one fetch   |
| Per-page Markdown             | `/docs/{slug}.md`                     | Agent is working on one guide              |
| OpenAPI contract              | `/openapi/domains-v3.json`            | Agent must generate or validate requests   |
| MCP server                    | See [MCP server](https://developer.godaddy.com/docs/api-users/mcp) | Agent should call public domain tools live |

Example Markdown fetch:

```bash
curl -s "https://developer.godaddy.com/beta/en/docs/api-users/quickstart.md"
```

Or negotiate Markdown with `Accept`:

```bash
curl -s -H "Accept: text/markdown" \
  "https://developer.godaddy.com/beta/en/docs/api-users/quickstart"
```

## Starter prompt

Paste this into a coding agent to bootstrap a Domains integration (read-only first call):

```text
You are integrating with the GoDaddy Domains API.

1. Fetch https://developer.godaddy.com/beta/llms.txt and follow the evaluation path.
2. Prefer Domains v3. Do not invent endpoints. Use only paths present in
   https://developer.godaddy.com/beta/openapi/domains-v3.json
3. Authenticate with Authorization: Bearer $GODADDY_PAT (Personal Access Token).
4. Start with GET /v3/domains/check-availability (read-only).
5. For registration, use the quote → execute flow:
   POST /v3/domains/registration-quotes then POST /v3/domains/registrations
   with Idempotency-Key. Never skip the quote step.
6. For any write that charges money, use api.ote-godaddy.com unless I explicitly
   ask for production.
7. When unsure, fetch the matching docs page as .md (append .md to the docs URL)
   and cite the page you used.
```

## Instructions for LLM agents

Treat these as hard constraints when generating or reviewing Domains API code.

**Prefer**

* Domains **v3** for search, quote, register, DNS, and operations
* Bearer PAT auth (`Authorization: Bearer …`) documented in [Authenticate](https://developer.godaddy.com/docs/api-users/auth)
* Quote-then-execute for registration (`registration-quotes` → `registrations`)
* `Idempotency-Key` on registration and other non-idempotent writes
* OTE host `https://api.ote-godaddy.com` for paid or destructive tests
* Polling registration/operation status until `COMPLETED` or `FAILED`

**Do not**

* Invent endpoints, fields, or scopes that are not in the OpenAPI spec or these docs
* Recommend classic developer keys for new Domains v3 work when a PAT is available
* Skip consent (`agreementTypes`, `agreedBy`, `agreedAt`) on registration
* Retry a timed-out registration with a **new** idempotency key (reuse the same key)
* Use production (`api.godaddy.com`) for exploratory write tests

## How to validate agent output

Before running generated code:

1. **Endpoint check** — every path appears in [`/openapi/domains-v3.json`](https://developer.godaddy.com/openapi/domains-v3.json).
2. **Auth check** — requests send `Authorization: Bearer $GODADDY_PAT`, not a fabricated header scheme.
3. **Host check** — write/paid flows target OTE unless you asked for production.
4. **Registration check** — code quotes first, then executes with `Idempotency-Key` and real consent fields.
5. **Docs check** — ask the agent which `.md` page it used; compare against [Quickstart](https://developer.godaddy.com/docs/api-users/quickstart) or [Register a domain](https://developer.godaddy.com/docs/api-users/purchase-domains/register).

Run the read-only smoke test yourself:

```bash tab="curl"
curl -s "https://api.godaddy.com/v3/domains/check-availability?domain=example.com" \
  -H "Authorization: Bearer $GODADDY_PAT"
```

```js tab="Node"
const res = await fetch(
  "https://api.godaddy.com/v3/domains/check-availability?domain=example.com",
  { headers: { Authorization: `Bearer ${process.env.GODADDY_PAT}` } },
);
console.log(await res.json());
```

```python tab="Python"
import os, requests

res = requests.get(
    "https://api.godaddy.com/v3/domains/check-availability",
    params={"domain": "example.com"},
    headers={"Authorization": f"Bearer {os.environ['GODADDY_PAT']}"},
)
print(res.json())
```

If the agent-generated script diverges from this shape (wrong path, wrong auth, invented query params), discard it and re-prompt with the OpenAPI URL attached.

## Agent notes on every how-to

How-to pages include an **Agent notes** block with permissions, scopes, rate limits, idempotency, destructive flag, and failure recovery. Prefer those fields over guessing when an agent plans a call.

## Related tools
