# List domains

URL: https://docs.hanzo.ai/docs/openapi/platform/get-platform-projects-by-project-apps-by-app-domains

> Returns every hostname this app answers on.

`GET /v1/platform/projects/{project}/apps/{app}/domains`

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

|               |                                                                          |
| ------------- | ------------------------------------------------------------------------ |
| **Address**   | `https://api.hanzo.ai/v1/platform/projects/{project}/apps/{app}/domains` |
| **Method**    | `GET`                                                                    |
| **Operation** | `get_platform_projects_by_project_apps_by_app_domains`                   |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`                                   |

Returns every hostname this app answers on.

It lists the app's hosts: the permanent default host it was born with, any
org-subtree hosts attached to it, and every custom host claimed for it with its
verification state and, while pending, the DNS challenge records to publish. Live
endpoint status for each host is observed from the cluster. Requires a validated
principal; 401 without one.

## Request

2 fields.

| Field     | In   | Type   | Required | Description                                                        |
| --------- | ---- | ------ | -------- | ------------------------------------------------------------------ |
| `project` | path | string | yes      | Project is the project the application lives under, from the path. |
| `app`     | path | string | yes      | App is the application's slug, from the path.                      |

## Response

| Status    | Body                   | Meaning |
| --------- | ---------------------- | ------- |
| `200`     | platform.domainView\[] | ok      |
| `default` | problem-details        | refused |

`200` body — 12 fields.

| Field                | In   | Type               | Always | Description                                                                                                         |
| -------------------- | ---- | ------------------ | ------ | ------------------------------------------------------------------------------------------------------------------- |
| `[].createdAt`       | body | integer (int64)    | —      | CreatedAt is the unix second the custom claim was made.                                                             |
| `[].detail`          | body | string             | —      | Detail says why a claim is still pending, in the resolver's own words.                                              |
| `[].host`            | body | string             | —      | Host is the hostname itself.                                                                                        |
| `[].kind`            | body | string             | —      | Kind is `default`, `subtree` or `custom` — how the org came to own it.                                              |
| `[].primary`         | body | boolean            | —      | Primary marks the app's permanent default host.                                                                     |
| `[].records`         | body | platform.Record\[] | —      | Records are the DNS records to publish while a custom claim is pending.                                             |
| `[].records[].name`  | body | string             | —      | the record name the customer creates                                                                                |
| `[].records[].type`  | body | string             | —      | TXT \| CNAME                                                                                                        |
| `[].records[].value` | body | string             | —      | the record value                                                                                                    |
| `[].status`          | body | string             | —      | Status is `live`, `provisioning`, `pending_deploy` or `pending`, derived from the operator CR and never fabricated. |
| `[].url`             | body | string             | —      | URL is the host as an HTTPS address.                                                                                |
| `[].verified`        | body | boolean            | —      | Verified is whether ownership is settled — always true for a host the org structurally owns.                        |

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

## Examples

**CLI**

```bash
hanzo platform projects apps domains list <project> <app>
```

**SDK**

**.ts**

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

const api = new PlatformApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getPlatformProjectsByProjectAppsByAppDomains({ project: 'project', app: 'app' });
```

**.py**

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

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = PlatformApi(client).get_platform_projects_by_project_apps_by_app_domains(project='project', app='app')
```

**.go**

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

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

**.rs**

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

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

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

**.java**

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

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

var result = new PlatformApi(client).getPlatformProjectsByProjectAppsByAppDomains();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/platform/projects/<project>/apps/<app>/domains \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

MCP reaches **platform** through the `platform` tool, which names its 38 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_build"
         }
       }
     }'
```

---

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