# List domains

URL: https://docs.hanzo.ai/docs/openapi/domain/get-domain-domains

> The domains your org has bought here, newest registration first, each carrying the name, when it was registered, when it expires, what the org paid, the registrar order id and the nameservers it points at.

`GET /v1/domain/domains`

> [Domain →](https://docs.hanzo.ai/docs/openapi/domain) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                          |
| ------------- | ---------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/domain/domains` |
| **Method**    | `GET`                                    |
| **Operation** | `get_domain_domains`                     |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`   |

The domains your org has bought here, newest registration first, each
carrying the name, when it was registered, when it expires, what the org paid,
the registrar order id and the nameservers it points at.

Scoped to the validated principal's org — 401 without one, and there is no
parameter that reaches another org's holdings.

This is the deployment's OWN ownership record, not a query to the registrar: it
lists what was bought THROUGH this surface, so a domain the org holds elsewhere
is not here. The default store is in-process, so a deployment that has not
swapped in a durable store answers from what this process registered.

## Request

`GET /v1/domain/domains` takes no parameters and no body — the credential is the whole request.

## Response

| Status    | Body            | Meaning |
| --------- | --------------- | ------- |
| `200`     | domain.holdings | ok      |
| `default` | problem-details | refused |

`200` body — 9 fields.

| Field                    | In   | Type              | Always | Description                                                     |
| ------------------------ | ---- | ----------------- | ------ | --------------------------------------------------------------- |
| `domains`                | body | domain.Holding\[] | —      | Domains is the caller org's domains, newest registration first. |
| `domains[].costCents`    | body | integer (int64)   | —      | wholesale cost                                                  |
| `domains[].domain`       | body | string            | —      | the name owned                                                  |
| `domains[].expiresAt`    | body | string            | —      | when the registration lapses, RFC3339                           |
| `domains[].nameservers`  | body | string\[]         | —      | the authoritative nameservers the name points at                |
| `domains[].order`        | body | integer (int64)   | —      | registrar order id                                              |
| `domains[].org`          | body | string            | —      | the org that owns the domain                                    |
| `domains[].priceCents`   | body | integer (int64)   | —      | what the customer paid (sell)                                   |
| `domains[].registeredAt` | body | integer (int64)   | —      | unix seconds                                                    |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo domain domains
```

**SDK**

**.ts**

```ts
import { Configuration, DomainApi } from 'hanzoai';

const api = new DomainApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getDomainDomains();
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import DomainApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = DomainApi(client).get_domain_domains()
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.DomainAPI.GetDomainDomains(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, domain_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = domain_api::get_domain_domains(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.DomainApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new DomainApi(client).getDomainDomains();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/domain/domains \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

MCP reaches **domain** through the `domain` tool, which names its 7 operations with its own verbs — this one among them, under a name only MCP declares. `describe` explains any of them:

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "get_domain_availability"
         }
       }
     }'
```

---

[Domain API](https://docs.hanzo.ai/docs/openapi/domain) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
