---
title: "Get the computer's custom domain"
description: "Owner only. The computer's custom domain, its state and the two DNS records to publish: the TXT record that proves control of the hostname and the CNAME that points it at Cool Computers."
canonical: "https://www.cool.computer/docs/api-reference/domains/get-the-computers-custom-domain"
---
# Get the computer's custom domain

> Owner only. The computer's custom domain, its state and the two DNS records to publish: the TXT record that proves control of the hostname and the CNAME that points it at Cool Computers.

```http
GET https://api.cool.computer/api/computers/{id}/domain
```

Owner only. The computer's custom domain, its state and the two DNS records to publish: the TXT record that proves control of the hostname and the CNAME that points it at Cool Computers. challenge: waiting for the TXT record (checked every 30 seconds until challenge_expires_at, then the request is dropped). issuing: the hostname is claimed and its certificate is being issued; it waits for the CNAME. serving: the certificate is active; it waits for the hostname to answer through Cool Computers. A claimed hostname that is not active within 7 days of its claim is removed. active: the hostname serves what the computer's own address serves, which keeps serving too. removing: the domain is being removed. detail says what it waits for.

## Authorization

- A Cool Computers API key, user access token, or claimed agent access token in the Authorization header. Follow https://www.cool.computer/auth.md for agent registration and https://www.cool.computer/authentication.md for direct user credentials.

## Parameters

- `id` (path, string, at least 1 characters, required): The computer's name, such as agent-atlas, or its id (cmp_…). Every caller may use either, the computer's own runtime token included.

## Responses

- `200`: The computer's custom domain.
  - `application/json` (object)
    - `hostname` (string, required): The hostname, lowercase, in its punycode form.
    - `state` ("challenge" or "issuing" or "serving" or "active" or "removing", required)
    - `detail` (string): What the domain waits for, or why it was removed.
    - `records` (array of object, required): The DNS records to publish: TXT _cool-challenge.\<hostname> with the challenge value, and the CNAME of the hostname.
      - `type` ("TXT" or "CNAME", required)
      - `name` (string, required)
      - `value` (string, required)
    - `challenge_expires_at` (string, date-time): While the state is challenge: when the request is dropped if the TXT record has not appeared.
- `401`: Unauthorized.
- `404`: Not Found. `domain_not_found`: the computer has no custom domain.
- `429`: Too Many Requests. If the problem code is api_request_rate_exceeded, wait for Retry-After seconds; other problem codes describe a separate limit.
- `500`: Internal Server Error.
- `503`: Service Unavailable. `artifacts_unavailable` means publishing, and with it custom domains, is not configured on this server.
- `default`: A machine-readable API error with a stable code and recovery instruction.

An error is an `application/problem+json` document with a stable `code`; [API errors](/docs/api-reference/errors) says how to handle one.

## Example

```sh
curl "https://api.cool.computer/api/computers/$PARAM_ID/domain" \
  -H "authorization: Bearer $TOKEN"
```
