# List domains and names

URL: https://heaven.dev/docs/reference/domains/view
Updated: 2026-11-21

List the custom domain names you can manage and their DNS states. Name a Computer to see the domains and paths that reach it.

`GET /v1/organization/domain/`

## Parameters

- `computer` (string): Computer name or ID.
- `organization` (string): Organization name or ID. A credential, named resource or sole membership can select the organization for you.

## Returns

- `data` (object, always present): The organization's DNS destination, connected domains and names assigned to Computers.
  - `domains` (object[] | null, always present): Domains connected to the organization and who can use them.
    - `items` (object): A domain connected to an organization.
      - `created_at` (string (date-time), always present): When the domain was connected.
      - `name` (string, always present): Connected domain name.
      - `names` (integer, always present): Number of its names assigned to Computers.
      - `team` (string, always present): Selected team when use is restricted to a team.
      - `who` (string, always present): Who in the organization can assign names under this domain.
      - `whole` (boolean, always present): Whether DNS sends all names under the domain to the organization.
  - `former_targets` (string[]): Earlier destinations that continue to work. May be omitted.
  - `names` (object[] | null, always present): Names assigned to Computers in the selected scope.
    - `alternative-1` (object[]): The domain names assigned to Computers in the selected scope.
      - `items` (object): A Computer's domain name and its DNS and certificate status.
        - `added_at` (string (date-time), always present): When the name was assigned.
        - `certificate_state` (string): HTTPS certificate's current state, when applicable. May be omitted.
        - `computer` (string, always present): Destination Computer's name.
        - `computer_id` (string, always present): Destination Computer's ID.
        - `dns_checked_at` (string (date-time) | null, always present): When DNS was last checked.
        - `dns_failing_since` (string (date-time) | null, always present): When the current DNS failure began.
        - `dns_message` (string | null, always present): An explanation of the DNS problem, when present.
        - `dns_reason` (string | null, always present): DNS problem code, or null without a recorded problem.
        - `dns_state` (string, always present): Latest DNS-check state.
        - `domain` (string, always present): Registrable domain containing this name.
        - `maintenance_paused` (boolean, always present): Whether automatic domain maintenance is paused.
        - `name` (string, always present): Full domain name.
        - `paths` (object[] | null, always present): Path-specific routes to other Computers.
          - `items` (object): A path under a domain name routed to a Computer.
            - `computer` (string, always present): Destination Computer's name.
            - `computer_id` (string, always present): Destination Computer's ID.
            - `path` (string, always present): URL path prefix to match.
            - `port` (integer): Destination port when explicitly selected. May be omitted.
            - `strip_prefix` (boolean): Whether forwarding removes the matched prefix. May be omitted.
        - `port` (integer | null, always present): Guest port; null uses the Computer's website setting.
        - `proxied` (boolean, always present): Whether Cloudflare's proxy sits in front of the name.
        - `redirect` (string, always present): Redirect destination, when this name redirects.
        - `unproven` (boolean, always present): Whether the name is still waiting for DNS proof.
        - `wildcard` (boolean, always present): Whether this is a wildcard name.
  - `target` (string, always present): Target for new DNS records.

## Errors

Each code is explained in full at https://heaven.dev/docs/reference/errors.

| Code | Status | What happened |
|---|---:|---|
| `invalid` | 400 | An input is missing or invalid. |
| `unauthenticated` | 401 | The credential is missing, invalid, expired or revoked. |
| `denied` | 403 | The caller lacks permission for this action. |
| `not_found` | 404 | The resource is absent or inaccessible to this caller. |
| `conflict` | 409 | The request conflicts with the current resource state or an earlier request. |
| `over_capacity` | 409 | The request exceeds a resource or credential allowance. |
| `access_list_full` | 409 | The change would exceed the access-list allowance. |
| `rate_limited` | 429 | The caller's request rate exceeds its limit. |
| `busy` | 429 | Too much work is in progress to accept this request. |
| `unknown` | 503 | The outcome is unconfirmed; a change may have happened. |
| `unavailable` | 503 | The service or requested feature is unavailable. |

## Notes

- API key permission: `domain view`.

## Examples

```sh tab="heaven CLI"
heaven domain view [COMPUTER]
  [--organization ORGANIZATION]
```

```sh tab="SSH"
ssh cli@heaven.dev domain view [COMPUTER]
  [--organization ORGANIZATION]
```

```sh tab="cURL"
curl https://heaven.dev/v1/organization/domain/ \
  -H "Authorization: Bearer $HEAVEN_API_KEY"
```

```json tab="MCP"
{ "tool": "domain_view",
  "arguments": {  } }
```

Response:

```json title="Response excerpt"
{
  "version": 1,
  "data": {
    "domains": [],
    "names": [],
    "target": "8928107cb9e1.domains.heaven.dev"
  }
}
```
